kitfly 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +63 -16
  3. package/VERSION +1 -1
  4. package/dist/_raw/content/deployment/preflight.md +134 -0
  5. package/dist/_raw/content/deployment/recipes/aws-s3.md +128 -0
  6. package/dist/_raw/content/deployment/recipes/cloudflare-pages.md +73 -0
  7. package/dist/_raw/content/deployment/recipes/cloudflare-r2.md +156 -0
  8. package/dist/_raw/content/deployment/recipes/fly-io.md +57 -0
  9. package/dist/_raw/content/deployment/recipes/github-pages.md +112 -0
  10. package/dist/_raw/content/deployment/recipes/netlify.md +99 -0
  11. package/dist/_raw/content/deployment/recipes/vercel.md +88 -0
  12. package/dist/_raw/content/deployment/secrets-and-env-vars.md +75 -0
  13. package/dist/_raw/content/deployment.md +128 -0
  14. package/dist/_raw/content/guide/approaches.md +182 -0
  15. package/dist/_raw/content/guide/features.md +121 -0
  16. package/dist/_raw/content/guide/getting-started.md +112 -0
  17. package/dist/_raw/content/guide/kitfly-overview.md +209 -0
  18. package/dist/_raw/content/reference/configuration.md +259 -0
  19. package/dist/_raw/content/reference/design-catalog.md +167 -0
  20. package/dist/_raw/content/reference/environment-variables.md +66 -0
  21. package/dist/_raw/content/reference/glossary.md +92 -0
  22. package/dist/_raw/content/reference/key-concepts.md +118 -0
  23. package/dist/_raw/content/reference/plugins.md +220 -0
  24. package/dist/_raw/content/reference/slides-authoring-guidelines.md +129 -0
  25. package/dist/_raw/content/reference/structure.md +166 -0
  26. package/dist/_raw/content/reference.md +20 -0
  27. package/dist/_raw/content/templates/crucible.md +192 -0
  28. package/dist/_raw/content/templates/handbook.md +83 -0
  29. package/dist/_raw/content/templates/minimal.md +138 -0
  30. package/dist/_raw/content/templates/overview.md +187 -0
  31. package/dist/_raw/content/templates/pipeline.md +151 -0
  32. package/dist/_raw/content/templates/productbook.md +187 -0
  33. package/dist/_raw/content/templates/runbook.md +193 -0
  34. package/dist/_raw/content/templates/servicebook.md +163 -0
  35. package/dist/_raw/docs/decisions/ADR-0001-minimalist-site-code.md +118 -0
  36. package/dist/_raw/docs/decisions/ADR-0002-ai-accessibility.md +153 -0
  37. package/dist/_raw/docs/decisions/ADR-0003-single-file-bundle.md +93 -0
  38. package/dist/_raw/docs/decisions/ADR-0004-bun-runtime.md +98 -0
  39. package/dist/_raw/docs/decisions/ADR-0005-plugin-contract-and-distribution.md +110 -0
  40. package/dist/_raw/docs/decisions/DDR-0001-viewport-locked-layout.md +111 -0
  41. package/dist/_raw/docs/decisions/DDR-0002-theme-system.md +131 -0
  42. package/dist/_raw/docs/decisions/DDR-0003-bounded-logo-slot.md +106 -0
  43. package/dist/_raw/docs/decisions/DDR-0004-slides-rendering-model.md +113 -0
  44. package/dist/_raw/docs/decisions/DDR-0005-deterministic-layout-boundary.md +107 -0
  45. package/dist/_raw/docs/userguide/cli/build.md +85 -0
  46. package/dist/_raw/docs/userguide/cli/bundle.md +81 -0
  47. package/dist/_raw/docs/userguide/cli/dev.md +92 -0
  48. package/dist/_raw/docs/userguide/cli/init.md +116 -0
  49. package/dist/_raw/docs/userguide/cli/servers.md +69 -0
  50. package/dist/_raw/docs/userguide/cli/stop.md +76 -0
  51. package/dist/_raw/docs/userguide/cli/update.md +78 -0
  52. package/dist/_raw/docs/userguide/cli/version.md +65 -0
  53. package/dist/_raw/docs/userguide/cli.md +34 -0
  54. package/dist/_raw/docs/userguide/sharing.md +94 -0
  55. package/dist/_raw/schemas/plugin-schemas-notes.md +71 -0
  56. package/dist/_raw/schemas.md +42 -0
  57. package/dist/assets/brand/kitfly-favicon-32.png +0 -0
  58. package/dist/assets/brand/kitfly-icon-64.png +0 -0
  59. package/dist/assets/brand/kitfly-logo-128.png +0 -0
  60. package/dist/assets/brand/kitfly-logo-512.png +0 -0
  61. package/dist/assets/brand/kitfly-logo.svg +12132 -0
  62. package/dist/assets/brand/kitfly-neon-128.png +0 -0
  63. package/dist/assets/brand/kitfly-neon-192.png +0 -0
  64. package/dist/assets/brand/kitfly-neon-256.png +0 -0
  65. package/dist/assets/brand/kitfly-neon.png +0 -0
  66. package/dist/assets/brand/palette.md +75 -0
  67. package/dist/content/deployment/index.html +11 -0
  68. package/dist/content/deployment/preflight.html +418 -0
  69. package/dist/content/deployment/recipes/aws-s3.html +421 -0
  70. package/dist/content/deployment/recipes/cloudflare-pages.html +372 -0
  71. package/dist/content/deployment/recipes/cloudflare-r2.html +443 -0
  72. package/dist/content/deployment/recipes/fly-io.html +356 -0
  73. package/dist/content/deployment/recipes/github-pages.html +414 -0
  74. package/dist/content/deployment/recipes/index.html +11 -0
  75. package/dist/content/deployment/recipes/netlify.html +394 -0
  76. package/dist/content/deployment/recipes/vercel.html +382 -0
  77. package/dist/content/deployment/secrets-and-env-vars.html +380 -0
  78. package/dist/content/deployment.html +426 -0
  79. package/dist/content/guide/approaches.html +501 -0
  80. package/dist/content/guide/features.html +436 -0
  81. package/dist/content/guide/getting-started.html +403 -0
  82. package/dist/content/guide/index.html +11 -0
  83. package/dist/content/guide/kitfly-overview.html +544 -0
  84. package/dist/content/index.html +11 -0
  85. package/dist/content/reference/configuration.html +580 -0
  86. package/dist/content/reference/design-catalog.html +449 -0
  87. package/dist/content/reference/environment-variables.html +367 -0
  88. package/dist/content/reference/glossary.html +368 -0
  89. package/dist/content/reference/index.html +11 -0
  90. package/dist/content/reference/key-concepts.html +399 -0
  91. package/dist/content/reference/plugins.html +491 -0
  92. package/dist/content/reference/slides-authoring-guidelines.html +418 -0
  93. package/dist/content/reference/structure.html +463 -0
  94. package/dist/content/reference.html +335 -0
  95. package/dist/content/templates/crucible.html +546 -0
  96. package/dist/content/templates/handbook.html +405 -0
  97. package/dist/content/templates/index.html +11 -0
  98. package/dist/content/templates/minimal.html +447 -0
  99. package/dist/content/templates/overview.html +558 -0
  100. package/dist/content/templates/pipeline.html +494 -0
  101. package/dist/content/templates/productbook.html +540 -0
  102. package/dist/content/templates/runbook.html +543 -0
  103. package/dist/content/templates/servicebook.html +523 -0
  104. package/dist/content-index.json +549 -0
  105. package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +491 -0
  106. package/dist/docs/decisions/ADR-0002-ai-accessibility.html +434 -0
  107. package/dist/docs/decisions/ADR-0003-single-file-bundle.html +412 -0
  108. package/dist/docs/decisions/ADR-0004-bun-runtime.html +409 -0
  109. package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +402 -0
  110. package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +459 -0
  111. package/dist/docs/decisions/DDR-0002-theme-system.html +452 -0
  112. package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +423 -0
  113. package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +399 -0
  114. package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +422 -0
  115. package/dist/docs/decisions/index.html +11 -0
  116. package/dist/docs/userguide/cli/build.html +408 -0
  117. package/dist/docs/userguide/cli/bundle.html +419 -0
  118. package/dist/docs/userguide/cli/dev.html +428 -0
  119. package/dist/docs/userguide/cli/index.html +11 -0
  120. package/dist/docs/userguide/cli/init.html +436 -0
  121. package/dist/docs/userguide/cli/servers.html +393 -0
  122. package/dist/docs/userguide/cli/stop.html +408 -0
  123. package/dist/docs/userguide/cli/update.html +406 -0
  124. package/dist/docs/userguide/cli/version.html +406 -0
  125. package/dist/docs/userguide/cli.html +386 -0
  126. package/dist/docs/userguide/index.html +11 -0
  127. package/dist/docs/userguide/sharing.html +465 -0
  128. package/dist/index.html +387 -0
  129. package/dist/llms.txt +18 -0
  130. package/dist/provenance.json +7 -0
  131. package/dist/schemas/index.html +11 -0
  132. package/dist/schemas/plugin-registry.schema.html +327 -0
  133. package/dist/schemas/plugin-schemas-notes.html +364 -0
  134. package/dist/schemas/plugin.schema.html +327 -0
  135. package/dist/schemas/plugins.schema.html +327 -0
  136. package/dist/schemas/v0/common.schema.html +386 -0
  137. package/dist/schemas/v0/index.html +11 -0
  138. package/dist/schemas/v0/plugin-registry.schema.html +547 -0
  139. package/dist/schemas/v0/plugin.schema.html +497 -0
  140. package/dist/schemas/v0/plugins.schema.html +406 -0
  141. package/dist/schemas/v0/site.schema.html +541 -0
  142. package/dist/schemas/v0/theme.schema.html +615 -0
  143. package/dist/schemas.html +351 -0
  144. package/dist/styles.css +1262 -0
  145. package/package.json +4 -2
  146. package/plugins-dist/callouts.css +32 -0
  147. package/plugins-dist/callouts.js +46 -0
  148. package/plugins-dist/slides-visuals.css +390 -0
  149. package/plugins-dist/slides-visuals.js +689 -0
  150. package/registry/plugins.yaml +35 -0
  151. package/schemas/README.md +10 -0
  152. package/schemas/plugin-registry.schema.json +5 -0
  153. package/schemas/plugin-schemas-notes.md +71 -0
  154. package/schemas/plugin.schema.json +5 -0
  155. package/schemas/plugins.schema.json +5 -0
  156. package/schemas/v0/common.schema.json +64 -0
  157. package/schemas/v0/plugin-registry.schema.json +225 -0
  158. package/schemas/v0/plugin.schema.json +175 -0
  159. package/schemas/v0/plugins.schema.json +84 -0
  160. package/schemas/v0/site.schema.json +56 -9
  161. package/schemas/v0/theme.schema.json +105 -22
  162. package/scripts/build.ts +158 -3
  163. package/scripts/bundle.ts +261 -95
  164. package/scripts/dev.ts +301 -11
  165. package/src/__tests__/build.test.ts +220 -1
  166. package/src/__tests__/bundle.test.ts +31 -0
  167. package/src/__tests__/cli.test.ts +14 -3
  168. package/src/__tests__/dev-plugin-errors.test.ts +20 -0
  169. package/src/__tests__/fixtures/fences/slides-visuals/invalid/bad-list-indent.md +5 -0
  170. package/src/__tests__/fixtures/fences/slides-visuals/invalid/blank-line.md +5 -0
  171. package/src/__tests__/fixtures/fences/slides-visuals/invalid/compare-object-items.md +9 -0
  172. package/src/__tests__/fixtures/fences/slides-visuals/invalid/flow-branching-no-source.md +5 -0
  173. package/src/__tests__/fixtures/fences/slides-visuals/invalid/flow-converging-no-target.md +6 -0
  174. package/src/__tests__/fixtures/fences/slides-visuals/invalid/indented-fence.md +4 -0
  175. package/src/__tests__/fixtures/fences/slides-visuals/invalid/staircase-empty-steps.md +3 -0
  176. package/src/__tests__/fixtures/fences/slides-visuals/invalid/stat-grid-missing-fields.md +5 -0
  177. package/src/__tests__/fixtures/fences/slides-visuals/invalid/timeline-horizontal-no-events.md +2 -0
  178. package/src/__tests__/fixtures/fences/slides-visuals/invalid/unknown-type.md +3 -0
  179. package/src/__tests__/fixtures/fences/slides-visuals/valid/compare.md +10 -0
  180. package/src/__tests__/fixtures/fences/slides-visuals/valid/comparison-table.md +14 -0
  181. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-branching-no-split.md +7 -0
  182. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-branching.md +8 -0
  183. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-converging-no-merge.md +7 -0
  184. package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-converging.md +8 -0
  185. package/src/__tests__/fixtures/fences/slides-visuals/valid/funnel.md +7 -0
  186. package/src/__tests__/fixtures/fences/slides-visuals/valid/kpi.md +5 -0
  187. package/src/__tests__/fixtures/fences/slides-visuals/valid/layer-cake.md +6 -0
  188. package/src/__tests__/fixtures/fences/slides-visuals/valid/pyramid.md +6 -0
  189. package/src/__tests__/fixtures/fences/slides-visuals/valid/quadrant-grid.md +8 -0
  190. package/src/__tests__/fixtures/fences/slides-visuals/valid/scorecard.md +13 -0
  191. package/src/__tests__/fixtures/fences/slides-visuals/valid/staircase-down.md +7 -0
  192. package/src/__tests__/fixtures/fences/slides-visuals/valid/staircase.md +8 -0
  193. package/src/__tests__/fixtures/fences/slides-visuals/valid/stat-grid.md +8 -0
  194. package/src/__tests__/fixtures/fences/slides-visuals/valid/timeline-horizontal.md +9 -0
  195. package/src/__tests__/fixtures/fences/slides-visuals/valid/timeline-vertical.md +10 -0
  196. package/src/__tests__/init.test.ts +35 -0
  197. package/src/__tests__/plugin-loader.test.ts +221 -0
  198. package/src/__tests__/shared.test.ts +451 -0
  199. package/src/__tests__/slides-visuals-fence-contract.test.ts +28 -0
  200. package/src/__tests__/slides-visuals-runtime-regressions.bun.test.ts +147 -0
  201. package/src/__tests__/styles.test.ts +35 -0
  202. package/src/cli.ts +9 -4
  203. package/src/plugin-loader.ts +245 -0
  204. package/src/shared.ts +650 -7
  205. package/src/site/styles.css +331 -0
  206. package/src/site/template.html +66 -5
  207. package/src/templates/deck.ts +186 -0
  208. package/src/templates/driver.ts +11 -1
  209. package/src/templates/minimal.ts +1 -0
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: "Recipe: Fly.io"
3
+ description: "Host your built site as a tiny app (Docker-based)"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Recipe: Fly.io
8
+
9
+ Fly.io is best when you want your Kitfly site hosted like an "app" (for example: private/internal access, custom headers, or a future path to auth).
10
+
11
+ This recipe assumes you're comfortable with a small amount of Docker.
12
+
13
+ If all you want is public static hosting with a custom domain, Netlify or GitHub Pages is usually simpler.
14
+
15
+ ## Prerequisites
16
+
17
+ - Fly.io account
18
+ - `flyctl` installed and authenticated
19
+
20
+ ## Build
21
+
22
+ ```bash
23
+ make build
24
+ ```
25
+
26
+ ## Create a tiny static container (nginx)
27
+
28
+ In your project root, create a `Dockerfile` like this:
29
+
30
+ ```dockerfile
31
+ FROM nginx:alpine
32
+ COPY dist/ /usr/share/nginx/html/
33
+ ```
34
+
35
+ Then:
36
+
37
+ ```bash
38
+ flyctl launch
39
+ flyctl deploy
40
+ ```
41
+
42
+ If `flyctl launch` asks for a port, you typically want `80` for a static nginx container.
43
+
44
+ ## Custom domain (DNS basics)
45
+
46
+ Typical pattern:
47
+
48
+ - `docs.example.com` → **CNAME** to the Fly-provided hostname
49
+
50
+ Fly provisions HTTPS automatically via Let's Encrypt for custom domains.
51
+
52
+ ## Verify + Rollback
53
+
54
+ - Verify: load the site, click a few pages, hard refresh, confirm HTTPS lock icon
55
+ - Rollback: Fly retains release history — promote a previous release with `flyctl releases` and `flyctl deploy --image <previous-image>`
56
+
57
+ See: [Preflight and Rollback](../preflight.html)
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: "Recipe: GitHub Pages"
3
+ description: "Publish `dist/` on GitHub Pages"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Recipe: GitHub Pages
8
+
9
+ GitHub Pages is a good choice when your docs already live in GitHub.
10
+
11
+ There are many ways to do Pages. This recipe focuses on a beginner-friendly approach first, then a more automated path.
12
+
13
+ If you're new to deployment: start with Option A. It's not "perfect", but it is simple and reliable.
14
+
15
+ ## Prerequisites
16
+
17
+ - A GitHub repository
18
+
19
+ ## Important: subdirectory paths
20
+
21
+ GitHub Pages project sites serve at `https://<user>.github.io/<repo-name>/` by default. Kitfly currently assumes root-level hosting, so links may break in subdirectory deployments.
22
+
23
+ **Recommended fix:** Configure a **custom domain** (e.g., `docs.example.com`) so the site is served at root. Or use a GitHub Pages "user/org" site (`<org>.github.io`) which serves from `/`.
24
+
25
+ ## Build
26
+
27
+ ```bash
28
+ make build
29
+ ```
30
+
31
+ ## Option A (simplest): commit the built site
32
+
33
+ 1. Copy `dist/` into a folder GitHub Pages can serve, commonly `docs/`
34
+ 2. Commit and push
35
+ 3. In GitHub repo settings → Pages:
36
+ - Source: "Deploy from a branch"
37
+ - Folder: `docs/` (or whatever you chose)
38
+
39
+ Notes:
40
+
41
+ - This is easy, but it means build artifacts live in git.
42
+
43
+ ## Option B (recommended): build via GitHub Actions
44
+
45
+ This workflow builds on every push to `main` and publishes `dist/` as the Pages artifact.
46
+
47
+ ```yaml
48
+ # .github/workflows/deploy-pages.yml
49
+ name: Deploy to GitHub Pages
50
+
51
+ on:
52
+ push:
53
+ branches: [main]
54
+
55
+ permissions:
56
+ contents: read
57
+ pages: write
58
+ id-token: write
59
+
60
+ concurrency:
61
+ group: pages
62
+ cancel-in-progress: true
63
+
64
+ jobs:
65
+ build:
66
+ runs-on: ubuntu-latest
67
+ steps:
68
+ - uses: actions/checkout@v4
69
+
70
+ - uses: oven-sh/setup-bun@v2
71
+ with:
72
+ bun-version: latest
73
+
74
+ - run: bun install
75
+
76
+ - run: make build
77
+
78
+ - uses: actions/upload-pages-artifact@v3
79
+ with:
80
+ path: dist
81
+
82
+ deploy:
83
+ needs: build
84
+ runs-on: ubuntu-latest
85
+ environment:
86
+ name: github-pages
87
+ url: ${{ steps.deployment.outputs.page_url }}
88
+ steps:
89
+ - id: deployment
90
+ uses: actions/deploy-pages@v4
91
+ ```
92
+
93
+ To use this workflow:
94
+
95
+ 1. Go to your repo → Settings → Pages → Source: **GitHub Actions**
96
+ 2. Commit the workflow file above
97
+ 3. Push to `main`
98
+
99
+ ## Custom domain (DNS basics)
100
+
101
+ Typical pattern:
102
+
103
+ - `docs.example.com` → **CNAME** to your `*.github.io` Pages domain
104
+
105
+ After configuring DNS, add a `CNAME` file inside your `dist/` output (or in a `public/` folder that your build copies to `dist/`) containing your custom domain.
106
+
107
+ ## Verify + Rollback
108
+
109
+ - Verify: load the site, click a few pages, hard refresh
110
+ - Rollback: redeploy a prior commit (Option A) or re-run a prior workflow (Option B)
111
+
112
+ See: [Preflight and Rollback](../preflight.html)
@@ -0,0 +1,99 @@
1
+ ---
2
+ title: "Recipe: Netlify"
3
+ description: "Beginner-friendly: upload `dist/` and go"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Recipe: Netlify
8
+
9
+ Netlify is a great default for a static Kitfly site because deployment can be as simple as uploading `dist/`.
10
+
11
+ If you want the "fewest moving parts" setup:
12
+
13
+ - start with a subdomain like `docs.example.com`
14
+ - deploy the built `dist/` output
15
+ - don't add redirects or fancy build settings until you need them
16
+
17
+ ## Prerequisites
18
+
19
+ - A Netlify account
20
+
21
+ ## Build
22
+
23
+ ```bash
24
+ make build
25
+ ```
26
+
27
+ ## Deploy (simplest: drag-and-drop)
28
+
29
+ 1. Go to Netlify
30
+ 2. Create a new site
31
+ 3. Drag-and-drop your `dist/` folder
32
+
33
+ This is perfect for small internal docs, quick demos, and "send a link" situations.
34
+
35
+ ## Deploy (repeatable: connect to Git)
36
+
37
+ If your docs live in a repo and you want a predictable "push to deploy" workflow:
38
+
39
+ 1. Connect your GitHub/GitLab repo in Netlify
40
+ 2. Set build command: `make build`
41
+ 3. Set publish directory: `dist`
42
+
43
+ Netlify will run your build and publish the `dist/` output.
44
+
45
+ Tip: this is often easier than asking everyone on the team to build locally.
46
+
47
+ ## Configuration file (optional)
48
+
49
+ For config-as-code, add `netlify.toml` to your project root:
50
+
51
+ ```toml
52
+ [build]
53
+ command = "make build"
54
+ publish = "dist"
55
+
56
+ [build.environment]
57
+ # Netlify needs Bun installed for the build
58
+ BUN_VERSION = "1"
59
+
60
+ [[headers]]
61
+ for = "/*"
62
+ [headers.values]
63
+ X-Frame-Options = "DENY"
64
+ X-Content-Type-Options = "nosniff"
65
+ ```
66
+
67
+ Note: Netlify doesn't ship Bun by default. You may need to add a build plugin or install step. Check Netlify's docs for current Bun support. Alternatively, build locally and use drag-and-drop or the Netlify CLI:
68
+
69
+ ```bash
70
+ make build
71
+ npx netlify-cli deploy --dir=dist --prod
72
+ ```
73
+
74
+ ## Custom domain (DNS basics)
75
+
76
+ Typical pattern:
77
+
78
+ - `docs.example.com` → **CNAME** to the Netlify target it gives you
79
+
80
+ If you need an apex/root domain, follow Netlify's UI guidance for apex handling (it varies by DNS provider).
81
+
82
+ HTTPS is provisioned automatically via Let's Encrypt once DNS is configured.
83
+
84
+ ## Caching (why you might not see changes)
85
+
86
+ If you deploy and your browser still shows old content:
87
+
88
+ - hard refresh (Shift+Reload)
89
+ - try an incognito window
90
+ - wait a minute (some caches take time)
91
+
92
+ Netlify invalidates its CDN cache on every deploy — if you still see stale content, it's likely browser cache.
93
+
94
+ ## Verify + Rollback
95
+
96
+ - Verify: load the site, click a few pages, hard refresh, confirm HTTPS lock icon
97
+ - Rollback: re-publish the previous deploy from Netlify's deploy history
98
+
99
+ See: [Preflight and Rollback](../preflight.html)
@@ -0,0 +1,88 @@
1
+ ---
2
+ title: "Recipe: Vercel"
3
+ description: "Deploy `dist/` to Vercel with CDN and custom domains"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Recipe: Vercel
8
+
9
+ Vercel is a good choice when you want fast global CDN, a clean dashboard, and simple "push to deploy" with zero config.
10
+
11
+ If you're already using Vercel for other projects, this is an easy add.
12
+
13
+ ## Prerequisites
14
+
15
+ - A Vercel account
16
+ - (For CLI deploys) `vercel` CLI installed: `npm i -g vercel`
17
+
18
+ ## Build
19
+
20
+ ```bash
21
+ make build
22
+ ```
23
+
24
+ Your deployable output is the `dist/` folder.
25
+
26
+ ## Deploy (simplest: drag-and-drop or CLI)
27
+
28
+ ### Option A: CLI deploy (quick)
29
+
30
+ From your project root:
31
+
32
+ ```bash
33
+ vercel deploy dist/
34
+ ```
35
+
36
+ This uploads `dist/` and gives you a preview URL. To deploy to production:
37
+
38
+ ```bash
39
+ vercel deploy dist/ --prod
40
+ ```
41
+
42
+ ### Option B: Connect a Git repo (repeatable)
43
+
44
+ 1. Import your repo in Vercel's dashboard
45
+ 2. Set the following in project settings:
46
+ - **Build Command**: `make build`
47
+ - **Output Directory**: `dist`
48
+ - **Install Command**: `bun install`
49
+
50
+ Now every push to `main` triggers a production deploy. Pull requests get preview deploys automatically.
51
+
52
+ ## Configuration file (optional)
53
+
54
+ If you prefer config-as-code, add `vercel.json` to your project root:
55
+
56
+ ```json
57
+ {
58
+ "buildCommand": "make build",
59
+ "outputDirectory": "dist",
60
+ "installCommand": "bun install",
61
+ "framework": null
62
+ }
63
+ ```
64
+
65
+ Setting `"framework": null` tells Vercel not to auto-detect a framework — Kitfly is not a framework Vercel recognizes, so this avoids unexpected behavior.
66
+
67
+ ## Custom domain (DNS basics)
68
+
69
+ Typical pattern:
70
+
71
+ - `docs.example.com` → **CNAME** to `cname.vercel-dns.com`
72
+
73
+ Vercel's dashboard walks you through adding custom domains. HTTPS is provisioned automatically.
74
+
75
+ ## Caching (why you might not see changes)
76
+
77
+ If you deploy and your browser still shows old content:
78
+
79
+ - hard refresh (Shift+Reload)
80
+ - try an incognito window
81
+ - Vercel CDN cache usually invalidates on deploy, but DNS propagation can take a few minutes
82
+
83
+ ## Verify + Rollback
84
+
85
+ - Verify: load the site, click a few pages, hard refresh
86
+ - Rollback: promote a previous deployment from Vercel's dashboard (Deployments → three-dot menu → Promote to Production)
87
+
88
+ See: [Preflight and Rollback](../preflight.html)
@@ -0,0 +1,75 @@
1
+ ---
2
+ title: "Secrets and Environment Variables"
3
+ description: "How to deploy without leaking credentials"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Secrets and Environment Variables
8
+
9
+ Most Kitfly deployments need **no secrets** because the output is static.
10
+
11
+ You only need secrets when a _deployment tool_ needs credentials (AWS CLI, Netlify CLI, etc.).
12
+
13
+ ## The one rule
14
+
15
+ Never commit secrets to git.
16
+
17
+ That includes:
18
+
19
+ - `.env` files
20
+ - API tokens
21
+ - access keys
22
+ - private keys
23
+
24
+ If you already committed something sensitive, treat it as leaked:
25
+
26
+ - rotate/revoke it
27
+ - remove it from git history if needed
28
+
29
+ ## Beginner-friendly pattern
30
+
31
+ 1. Put secret values in environment variables (or your host's secret store).
32
+ 2. Keep a local `.env` file _only if you must_ — and make sure it is gitignored.
33
+ 3. Use placeholder examples (`.env.example`) to document required variables.
34
+
35
+ ## What is an environment variable?
36
+
37
+ An environment variable is a named value your terminal (or hosting platform) provides to a command.
38
+
39
+ If you want a quick primer with copy-paste commands, see:
40
+
41
+ - [Reference: Environment Variables](../reference/environment-variables.html)
42
+
43
+ ## Host secret stores (recommended)
44
+
45
+ If your host offers a "Secrets" UI, use it. It's harder to accidentally leak.
46
+
47
+ Examples (names vary by provider):
48
+
49
+ - "Environment variables"
50
+ - "Secrets"
51
+ - "Build & deploy settings"
52
+
53
+ ## Least privilege (plain language)
54
+
55
+ Create credentials that can do only what deployment needs.
56
+
57
+ Examples:
58
+
59
+ - An AWS IAM user/policy that can only write to one S3 bucket
60
+ - A Netlify token that can only deploy to one site (if supported)
61
+ - A Cloudflare API token scoped to a single zone or R2 bucket
62
+
63
+ ## Do / Don't
64
+
65
+ **Do**
66
+
67
+ - Do keep secrets in a password manager
68
+ - Do rotate tokens periodically
69
+ - Do prefer scoped tokens over "account owner" tokens
70
+
71
+ **Don't**
72
+
73
+ - Don't paste secrets into docs
74
+ - Don't put secrets in `site.yaml`
75
+ - Don't share secrets in Slack threads
@@ -0,0 +1,128 @@
1
+ ---
2
+ title: "Deployment"
3
+ description: "Publish a Kitfly site safely (with beginner-friendly guardrails)"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Deployment
8
+
9
+ Kitfly builds a static site. Deployment is just "upload the `dist/` folder".
10
+
11
+ Before you pick a host, read this once:
12
+
13
+ ## Safety first (please read)
14
+
15
+ ### Do
16
+
17
+ - Keep secrets out of your repo. Use environment variables or your host's secret store.
18
+ - Use least-privilege credentials (scoped token, minimal permissions).
19
+ - Deploy from a clean build: `make build` (or `bun run build`) and upload `dist/`.
20
+ - Keep a rollback path: retain the previous `dist/` somewhere you can restore quickly.
21
+ - Verify HTTPS works after your first deploy (most hosts provide it free).
22
+
23
+ ### Don't
24
+
25
+ - Don't commit `.env` files or cloud credentials.
26
+ - Don't "just make the bucket public" unless you understand the blast radius.
27
+ - Don't deploy from a random working tree state you can't reproduce.
28
+
29
+ Next: read [Secrets and Environment Variables](deployment/secrets-and-env-vars.html) and [Preflight](deployment/preflight.html).
30
+
31
+ ---
32
+
33
+ ## Build vs bundle (two "shipping" modes)
34
+
35
+ Kitfly has two ways to get your writing out into the world:
36
+
37
+ - **Host it**: `kitfly build` → upload the `dist/` folder to a static host (the rest of this section).
38
+ - **Send it**: `kitfly bundle` → one HTML file you can email/Slack/upload (offline-friendly).
39
+
40
+ If you're not sure which you want, start with **bundle** for internal reviews and **build** when you want a permanent link.
41
+
42
+ ## Which host should I pick?
43
+
44
+ Use this as a quick menu:
45
+
46
+ ### Easiest (beginner-friendly)
47
+
48
+ - **Cloudflare Pages** — a clean "static site host" with great CDN + custom domains.
49
+ Recipe: [Cloudflare Pages](deployment/recipes/cloudflare-pages.html)
50
+
51
+ - **Netlify** — simplest "upload `dist/`" flow, easy custom domains.
52
+ Recipe: [Netlify](deployment/recipes/netlify.html)
53
+
54
+ - **GitHub Pages** — great if your docs live in GitHub already.
55
+ Recipe: [GitHub Pages](deployment/recipes/github-pages.html)
56
+
57
+ - **Vercel** — fast CDN, clean UI, good "push to deploy" experience.
58
+ Recipe: [Vercel](deployment/recipes/vercel.html)
59
+
60
+ ### If you're already on a platform
61
+
62
+ - **AWS S3** — straightforward static hosting; best if your org is already in AWS.
63
+ Recipe: [AWS S3](deployment/recipes/aws-s3.html)
64
+
65
+ - **Cloudflare R2** — advanced; object storage that you usually put behind Pages/Workers.
66
+ Recipe: [Cloudflare R2](deployment/recipes/cloudflare-r2.html)
67
+
68
+ ### "I want an app host"
69
+
70
+ - **Fly.io** — good when you want a small always-on service (private/internal, auth, etc.).
71
+ Recipe: [Fly.io](deployment/recipes/fly-io.html)
72
+
73
+ ---
74
+
75
+ ## Base path / subdirectory hosting
76
+
77
+ Kitfly currently generates sites that assume they are served from the root of a domain (`/`).
78
+
79
+ If you deploy to a subdirectory path (for example, GitHub Pages project sites serve at `/<repo-name>/`), internal links and asset references may break.
80
+
81
+ **Workarounds:**
82
+
83
+ - Use a **custom domain** or **subdomain** (`docs.example.com`) pointed at your host — this avoids the subdirectory issue entirely.
84
+ - For GitHub Pages specifically, use a "user/org" site (`<org>.github.io`) which serves at root, or configure a custom domain.
85
+
86
+ Base path support is being considered for a future release.
87
+
88
+ ---
89
+
90
+ ## DNS basics (quick primer)
91
+
92
+ If you bring your own domain, you'll do one of these:
93
+
94
+ - **Subdomain** (`docs.example.com`) → usually a **CNAME** to your host target.
95
+ - **Apex/root** (`example.com`) → often **A/AAAA** records, or an "ALIAS/ANAME" feature (varies by DNS provider).
96
+
97
+ Quick definitions:
98
+
99
+ - **A** = IPv4 address record
100
+ - **AAAA** = IPv6 address record
101
+ - **CNAME** = alias one name to another name
102
+
103
+ Each recipe calls out the common DNS pattern for that host.
104
+
105
+ ---
106
+
107
+ ## HTTPS
108
+
109
+ Every host in this section provides free HTTPS (via Let's Encrypt or equivalent). After your first deploy:
110
+
111
+ - Verify HTTPS works: load `https://your-domain.com` and check the lock icon.
112
+ - If your host offers "force HTTPS" or "redirect HTTP → HTTPS", enable it.
113
+ - Don't serve docs over plain HTTP in production.
114
+
115
+ ---
116
+
117
+ ## Common workflow (host-agnostic)
118
+
119
+ 1. Build: `make build` (outputs `dist/`)
120
+ 2. Preview locally (optional): open the built site in a browser
121
+ 3. Deploy: upload/sync `dist/`
122
+ 4. Verify: load the site, click around, hard refresh
123
+ 5. Confirm HTTPS works (first deploy)
124
+ 6. Roll back if needed: redeploy the previous `dist/`
125
+
126
+ If you're not sure what an environment variable is (or how to set one), see:
127
+
128
+ - [Reference: Environment Variables](reference/environment-variables.html)