kitfly 0.1.2 → 0.2.0

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 (194) hide show
  1. package/CHANGELOG.md +34 -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/structure.md +166 -0
  25. package/dist/_raw/content/reference.md +19 -0
  26. package/dist/_raw/content/templates/crucible.md +192 -0
  27. package/dist/_raw/content/templates/handbook.md +83 -0
  28. package/dist/_raw/content/templates/minimal.md +138 -0
  29. package/dist/_raw/content/templates/overview.md +187 -0
  30. package/dist/_raw/content/templates/pipeline.md +151 -0
  31. package/dist/_raw/content/templates/productbook.md +187 -0
  32. package/dist/_raw/content/templates/runbook.md +193 -0
  33. package/dist/_raw/content/templates/servicebook.md +163 -0
  34. package/dist/_raw/docs/decisions/ADR-0001-minimalist-site-code.md +118 -0
  35. package/dist/_raw/docs/decisions/ADR-0002-ai-accessibility.md +153 -0
  36. package/dist/_raw/docs/decisions/ADR-0003-single-file-bundle.md +93 -0
  37. package/dist/_raw/docs/decisions/ADR-0004-bun-runtime.md +98 -0
  38. package/dist/_raw/docs/decisions/ADR-0005-plugin-contract-and-distribution.md +110 -0
  39. package/dist/_raw/docs/decisions/DDR-0001-viewport-locked-layout.md +111 -0
  40. package/dist/_raw/docs/decisions/DDR-0002-theme-system.md +131 -0
  41. package/dist/_raw/docs/decisions/DDR-0003-bounded-logo-slot.md +106 -0
  42. package/dist/_raw/docs/decisions/DDR-0004-slides-rendering-model.md +113 -0
  43. package/dist/_raw/docs/decisions/DDR-0005-deterministic-layout-boundary.md +107 -0
  44. package/dist/_raw/docs/userguide/cli/build.md +85 -0
  45. package/dist/_raw/docs/userguide/cli/bundle.md +81 -0
  46. package/dist/_raw/docs/userguide/cli/dev.md +92 -0
  47. package/dist/_raw/docs/userguide/cli/init.md +116 -0
  48. package/dist/_raw/docs/userguide/cli/servers.md +69 -0
  49. package/dist/_raw/docs/userguide/cli/stop.md +76 -0
  50. package/dist/_raw/docs/userguide/cli/update.md +78 -0
  51. package/dist/_raw/docs/userguide/cli/version.md +65 -0
  52. package/dist/_raw/docs/userguide/cli.md +34 -0
  53. package/dist/_raw/docs/userguide/sharing.md +94 -0
  54. package/dist/_raw/schemas/plugin-schemas-notes.md +71 -0
  55. package/dist/_raw/schemas.md +42 -0
  56. package/dist/assets/brand/kitfly-favicon-32.png +0 -0
  57. package/dist/assets/brand/kitfly-icon-64.png +0 -0
  58. package/dist/assets/brand/kitfly-logo-128.png +0 -0
  59. package/dist/assets/brand/kitfly-logo-512.png +0 -0
  60. package/dist/assets/brand/kitfly-logo.svg +12132 -0
  61. package/dist/assets/brand/kitfly-neon-128.png +0 -0
  62. package/dist/assets/brand/kitfly-neon-192.png +0 -0
  63. package/dist/assets/brand/kitfly-neon-256.png +0 -0
  64. package/dist/assets/brand/kitfly-neon.png +0 -0
  65. package/dist/assets/brand/palette.md +75 -0
  66. package/dist/content/deployment/index.html +11 -0
  67. package/dist/content/deployment/preflight.html +418 -0
  68. package/dist/content/deployment/recipes/aws-s3.html +421 -0
  69. package/dist/content/deployment/recipes/cloudflare-pages.html +372 -0
  70. package/dist/content/deployment/recipes/cloudflare-r2.html +443 -0
  71. package/dist/content/deployment/recipes/fly-io.html +356 -0
  72. package/dist/content/deployment/recipes/github-pages.html +414 -0
  73. package/dist/content/deployment/recipes/index.html +11 -0
  74. package/dist/content/deployment/recipes/netlify.html +394 -0
  75. package/dist/content/deployment/recipes/vercel.html +382 -0
  76. package/dist/content/deployment/secrets-and-env-vars.html +380 -0
  77. package/dist/content/deployment.html +426 -0
  78. package/dist/content/guide/approaches.html +501 -0
  79. package/dist/content/guide/features.html +436 -0
  80. package/dist/content/guide/getting-started.html +403 -0
  81. package/dist/content/guide/index.html +11 -0
  82. package/dist/content/guide/kitfly-overview.html +544 -0
  83. package/dist/content/index.html +11 -0
  84. package/dist/content/reference/configuration.html +580 -0
  85. package/dist/content/reference/design-catalog.html +449 -0
  86. package/dist/content/reference/environment-variables.html +367 -0
  87. package/dist/content/reference/glossary.html +368 -0
  88. package/dist/content/reference/index.html +11 -0
  89. package/dist/content/reference/key-concepts.html +399 -0
  90. package/dist/content/reference/plugins.html +491 -0
  91. package/dist/content/reference/structure.html +463 -0
  92. package/dist/content/reference.html +334 -0
  93. package/dist/content/templates/crucible.html +546 -0
  94. package/dist/content/templates/handbook.html +405 -0
  95. package/dist/content/templates/index.html +11 -0
  96. package/dist/content/templates/minimal.html +447 -0
  97. package/dist/content/templates/overview.html +558 -0
  98. package/dist/content/templates/pipeline.html +494 -0
  99. package/dist/content/templates/productbook.html +540 -0
  100. package/dist/content/templates/runbook.html +543 -0
  101. package/dist/content/templates/servicebook.html +523 -0
  102. package/dist/content-index.json +540 -0
  103. package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +491 -0
  104. package/dist/docs/decisions/ADR-0002-ai-accessibility.html +434 -0
  105. package/dist/docs/decisions/ADR-0003-single-file-bundle.html +412 -0
  106. package/dist/docs/decisions/ADR-0004-bun-runtime.html +409 -0
  107. package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +402 -0
  108. package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +459 -0
  109. package/dist/docs/decisions/DDR-0002-theme-system.html +452 -0
  110. package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +423 -0
  111. package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +399 -0
  112. package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +422 -0
  113. package/dist/docs/decisions/index.html +11 -0
  114. package/dist/docs/userguide/cli/build.html +408 -0
  115. package/dist/docs/userguide/cli/bundle.html +419 -0
  116. package/dist/docs/userguide/cli/dev.html +428 -0
  117. package/dist/docs/userguide/cli/index.html +11 -0
  118. package/dist/docs/userguide/cli/init.html +436 -0
  119. package/dist/docs/userguide/cli/servers.html +393 -0
  120. package/dist/docs/userguide/cli/stop.html +408 -0
  121. package/dist/docs/userguide/cli/update.html +406 -0
  122. package/dist/docs/userguide/cli/version.html +406 -0
  123. package/dist/docs/userguide/cli.html +386 -0
  124. package/dist/docs/userguide/index.html +11 -0
  125. package/dist/docs/userguide/sharing.html +465 -0
  126. package/dist/index.html +387 -0
  127. package/dist/llms.txt +18 -0
  128. package/dist/provenance.json +7 -0
  129. package/dist/schemas/index.html +11 -0
  130. package/dist/schemas/plugin-registry.schema.html +327 -0
  131. package/dist/schemas/plugin-schemas-notes.html +364 -0
  132. package/dist/schemas/plugin.schema.html +327 -0
  133. package/dist/schemas/plugins.schema.html +327 -0
  134. package/dist/schemas/v0/common.schema.html +386 -0
  135. package/dist/schemas/v0/index.html +11 -0
  136. package/dist/schemas/v0/plugin-registry.schema.html +547 -0
  137. package/dist/schemas/v0/plugin.schema.html +497 -0
  138. package/dist/schemas/v0/plugins.schema.html +406 -0
  139. package/dist/schemas/v0/site.schema.html +541 -0
  140. package/dist/schemas/v0/theme.schema.html +615 -0
  141. package/dist/schemas.html +351 -0
  142. package/dist/styles.css +1262 -0
  143. package/package.json +4 -2
  144. package/plugins-dist/callouts.css +32 -0
  145. package/plugins-dist/callouts.js +46 -0
  146. package/plugins-dist/slides-visuals.css +224 -0
  147. package/plugins-dist/slides-visuals.js +598 -0
  148. package/registry/plugins.yaml +35 -0
  149. package/schemas/README.md +10 -0
  150. package/schemas/plugin-registry.schema.json +5 -0
  151. package/schemas/plugin-schemas-notes.md +71 -0
  152. package/schemas/plugin.schema.json +5 -0
  153. package/schemas/plugins.schema.json +5 -0
  154. package/schemas/v0/common.schema.json +64 -0
  155. package/schemas/v0/plugin-registry.schema.json +225 -0
  156. package/schemas/v0/plugin.schema.json +175 -0
  157. package/schemas/v0/plugins.schema.json +84 -0
  158. package/schemas/v0/site.schema.json +56 -9
  159. package/schemas/v0/theme.schema.json +105 -22
  160. package/scripts/build.ts +155 -3
  161. package/scripts/bundle.ts +258 -95
  162. package/scripts/dev.ts +203 -1
  163. package/src/__tests__/build.test.ts +158 -1
  164. package/src/__tests__/bundle.test.ts +31 -0
  165. package/src/__tests__/cli.test.ts +14 -3
  166. package/src/__tests__/fixtures/fences/slides-visuals/invalid/bad-list-indent.md +5 -0
  167. package/src/__tests__/fixtures/fences/slides-visuals/invalid/blank-line.md +5 -0
  168. package/src/__tests__/fixtures/fences/slides-visuals/invalid/compare-object-items.md +9 -0
  169. package/src/__tests__/fixtures/fences/slides-visuals/invalid/indented-fence.md +4 -0
  170. package/src/__tests__/fixtures/fences/slides-visuals/invalid/stat-grid-missing-fields.md +5 -0
  171. package/src/__tests__/fixtures/fences/slides-visuals/invalid/unknown-type.md +3 -0
  172. package/src/__tests__/fixtures/fences/slides-visuals/valid/compare.md +10 -0
  173. package/src/__tests__/fixtures/fences/slides-visuals/valid/comparison-table.md +14 -0
  174. package/src/__tests__/fixtures/fences/slides-visuals/valid/funnel.md +7 -0
  175. package/src/__tests__/fixtures/fences/slides-visuals/valid/kpi.md +5 -0
  176. package/src/__tests__/fixtures/fences/slides-visuals/valid/layer-cake.md +6 -0
  177. package/src/__tests__/fixtures/fences/slides-visuals/valid/pyramid.md +6 -0
  178. package/src/__tests__/fixtures/fences/slides-visuals/valid/quadrant-grid.md +8 -0
  179. package/src/__tests__/fixtures/fences/slides-visuals/valid/scorecard.md +13 -0
  180. package/src/__tests__/fixtures/fences/slides-visuals/valid/stat-grid.md +8 -0
  181. package/src/__tests__/init.test.ts +35 -0
  182. package/src/__tests__/plugin-loader.test.ts +221 -0
  183. package/src/__tests__/shared.test.ts +428 -0
  184. package/src/__tests__/slides-visuals-fence-contract.test.ts +28 -0
  185. package/src/__tests__/slides-visuals-runtime-regressions.bun.test.ts +114 -0
  186. package/src/__tests__/styles.test.ts +35 -0
  187. package/src/cli.ts +9 -4
  188. package/src/plugin-loader.ts +245 -0
  189. package/src/shared.ts +614 -7
  190. package/src/site/styles.css +331 -0
  191. package/src/site/template.html +66 -5
  192. package/src/templates/deck.ts +186 -0
  193. package/src/templates/driver.ts +11 -1
  194. package/src/templates/minimal.ts +1 -0
@@ -0,0 +1,259 @@
1
+ ---
2
+ title: "Configuration"
3
+ description: "Customize your kitfly site"
4
+ last_updated: "2026-02-03"
5
+ ---
6
+
7
+ # Configuration
8
+
9
+ Kitfly uses `site.yaml` for configuration. Everything is optional - sensible defaults apply.
10
+
11
+ ## Quick Reference
12
+
13
+ ```yaml
14
+ # yaml-language-server: $schema=./schemas/v0/site.schema.json
15
+ schemaVersion: "0.1.0"
16
+ docroot: "content"
17
+ title: "My Documentation"
18
+ version: "2.4.1"
19
+ home: "index.md"
20
+
21
+ brand:
22
+ name: "My Project"
23
+ url: "https://myproject.com"
24
+ external: true
25
+
26
+ sections:
27
+ - name: "Guide"
28
+ path: "guide"
29
+ - name: "API"
30
+ path: "api"
31
+
32
+ footer:
33
+ copyright: "© 2026 My Project. All rights reserved."
34
+ links:
35
+ - text: "Privacy"
36
+ url: "/privacy"
37
+ - text: "Terms"
38
+ url: "/terms"
39
+ attribution: true
40
+ ```
41
+
42
+ ## Settings
43
+
44
+ ### docroot
45
+
46
+ **The most important setting.** Controls what folder contains your documentation.
47
+
48
+ ```yaml
49
+ docroot: "content"
50
+ ```
51
+
52
+ | Value | Meaning |
53
+ | ----------- | ------------------------------------------ |
54
+ | `"content"` | Markdown lives in `content/` (recommended) |
55
+ | `"docs"` | Markdown lives in `docs/` |
56
+ | `"."` | Markdown lives in repo root |
57
+
58
+ **Why it matters:** Only files under `docroot` appear in your built site. Everything else - `src/`, `scripts/`, `README.md`, `package.json` - stays out of `dist/`.
59
+
60
+ See [Folder Structure](structure.html) for details.
61
+
62
+ ### title
63
+
64
+ Site title. Appears in browser tab and header.
65
+
66
+ ```yaml
67
+ title: "My Documentation"
68
+ ```
69
+
70
+ ### version
71
+
72
+ Site/content version shown in the footer provenance zone.
73
+
74
+ ```yaml
75
+ version: "2.4.1"
76
+ ```
77
+
78
+ Version resolution order:
79
+
80
+ 1. `site.yaml` `version`
81
+ 2. Git tag on `HEAD` (exact match, `v` prefix removed)
82
+ 3. Omitted from footer provenance if neither is available
83
+
84
+ ### home
85
+
86
+ Home page file (relative to docroot). Becomes `index.html`.
87
+
88
+ ```yaml
89
+ home: "index.md"
90
+ ```
91
+
92
+ If omitted, the first file from the first section is used.
93
+
94
+ ### brand
95
+
96
+ Header branding:
97
+
98
+ ```yaml
99
+ brand:
100
+ name: "My Project" # Text in header
101
+ url: "/" # Logo link
102
+ logo: "assets/brand/my-logo.png" # Sidebar logo image
103
+ favicon: "assets/brand/favicon-32.png" # Browser tab icon
104
+ external: true # Open in new tab (optional)
105
+ ```
106
+
107
+ The logo renders inside a bounded slot that preserves aspect ratio:
108
+
109
+ | Breakpoint | Max Height | Max Width |
110
+ | ---------------- | ---------- | --------- |
111
+ | Desktop | 64px | 180px |
112
+ | Tablet (≤1024px) | 56px | 150px |
113
+ | Mobile (≤768px) | 48px | 130px |
114
+
115
+ Both square marks and wide wordmarks fit cleanly. SVG and PNG formats are supported. For SVGs, ensure the `viewBox` is tightly cropped to the artwork — an oversized canvas will render the logo too small.
116
+
117
+ ### sections
118
+
119
+ Navigation structure. Each section becomes a sidebar group.
120
+
121
+ ```yaml
122
+ sections:
123
+ - name: "Guide" # Display name
124
+ path: "guide" # Directory (relative to docroot)
125
+ - name: "Reference"
126
+ path: "reference"
127
+ ```
128
+
129
+ **Auto-discovery:** If `files` is omitted, all `.md` files in the directory are included, recursively up to `maxDepth` levels deep.
130
+
131
+ ```yaml
132
+ sections:
133
+ - name: "Reference"
134
+ path: "reference"
135
+ maxDepth: 6 # Discover up to 6 levels deep (default: 4, max: 10)
136
+ ```
137
+
138
+ | Setting | Default | Range | Effect |
139
+ | ---------- | ------- | ----- | ------------------------------------------------- |
140
+ | `maxDepth` | 4 | 1–10 | How many directory levels to scan for `.md` files |
141
+
142
+ Deeper sections produce hierarchical sidebar navigation with collapsible groups. Set a lower `maxDepth` for sections where you want a flatter sidebar.
143
+
144
+ **Explicit files:** For precise control over which files appear (bypasses auto-discovery):
145
+
146
+ ```yaml
147
+ sections:
148
+ - name: "Overview"
149
+ path: "."
150
+ files: ["README.md", "CHANGELOG.md"]
151
+ ```
152
+
153
+ ### footer
154
+
155
+ Footer has three zones: provenance (left), copyright and links (center), and Kitfly attribution (right). Each field is independent — setting one does not affect the others.
156
+
157
+ ```
158
+ v0.1.1 · Published 2026-02-10 © 2026 Acme Inc. · acme.com Built with Kitfly
159
+ ← provenance (automatic) ← copyright + links (configurable) → ← attribution →
160
+ ```
161
+
162
+ | Field | Default | What it controls |
163
+ | -------------- | -------------------------------- | ----------------------------------------- |
164
+ | `copyright` | `© {publish-year} {brand.name}` | The copyright text in the center zone |
165
+ | `copyrightUrl` | _(none)_ | Makes the copyright text a clickable link |
166
+ | `links` | Your `brand.url` shown as a link | Links after the copyright text (max 10) |
167
+ | `attribution` | `true` | "Built with Kitfly" on the right |
168
+
169
+ **Common case: product name differs from copyright holder.** The default copyright uses `brand.name`, which is your product title (shown in the header). If your legal entity is different, override it:
170
+
171
+ ```yaml
172
+ # brand.name is "Acme Productbook" — that's the product title
173
+ # but the copyright holder is the company
174
+ footer:
175
+ copyright: "© 2026 Acme, Inc."
176
+ ```
177
+
178
+ This changes only the copyright. The brand URL link and attribution are unaffected.
179
+
180
+ **Make the copyright clickable:**
181
+
182
+ ```yaml
183
+ footer:
184
+ copyright: "© 2026 3 Leaps, LLC"
185
+ copyrightUrl: "https://3leaps.net"
186
+ ```
187
+
188
+ When `copyrightUrl` is set, the copyright text becomes a link. When omitted, it renders as plain text.
189
+
190
+ **Full example with all options:**
191
+
192
+ ```yaml
193
+ footer:
194
+ copyright: "© 2026 My Company, Inc."
195
+ copyrightUrl: "https://mycompany.com"
196
+ links:
197
+ - text: "Privacy"
198
+ url: "/privacy"
199
+ - text: "Terms"
200
+ url: "/terms"
201
+ attribution: true
202
+ ```
203
+
204
+ When `links` is set, it replaces the default brand URL link. When `links` is omitted, your `brand.url` appears as a link (with the protocol stripped — `https://acme.com` displays as `acme.com`).
205
+
206
+ Set `footer.attribution: false` to remove the "Built with Kitfly" text from the footer entirely.
207
+
208
+ ### theme layout (`theme.yaml`)
209
+
210
+ `theme.yaml` can override layout variables, including sidebar width.
211
+
212
+ ```yaml
213
+ # theme.yaml
214
+ layout:
215
+ sidebarWidth: "320px"
216
+ ```
217
+
218
+ This sets `--sidebar-width` and applies to dev server, static builds, and bundles.
219
+
220
+ Recommended range: `240px` to `400px` depending on logo and nav label length.
221
+
222
+ ## Frontmatter
223
+
224
+ Each markdown file can have YAML frontmatter:
225
+
226
+ ```yaml
227
+ ---
228
+ title: "Page Title"
229
+ description: "Brief description for meta tags"
230
+ last_updated: "2026-02-03"
231
+ ---
232
+ # Content starts here
233
+ ```
234
+
235
+ | Field | Purpose |
236
+ | -------------- | ------------------------------- |
237
+ | `title` | Page title (overrides filename) |
238
+ | `description` | Meta description |
239
+ | `last_updated` | Shown in page footer |
240
+
241
+ ## No Configuration
242
+
243
+ If you don't create `site.yaml`, kitfly will:
244
+
245
+ 1. Look for `content/` directory
246
+ 2. Auto-discover sections from subdirectories
247
+ 3. Use default title ("Documentation") and branding
248
+
249
+ This means you can start with just markdown files and add `site.yaml` later.
250
+
251
+ ## Schema Validation
252
+
253
+ For editor autocomplete and validation, reference the schema:
254
+
255
+ ```yaml
256
+ # yaml-language-server: $schema=./schemas/v0/site.schema.json
257
+ ```
258
+
259
+ The schema is in `schemas/v0/site.schema.json`.
@@ -0,0 +1,167 @@
1
+ ---
2
+ title: "Design Catalog (Shapes and Figures)"
3
+ description: "Deterministic layout building blocks for slides (and when to use diagram engines instead)"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Design Catalog (Shapes and Figures)
8
+
9
+ Kitfly is **not** trying to recreate diagram engines like Mermaid or PlantUML.
10
+
11
+ Those tools compute layout from relationships (a graph). That’s powerful, but the output can be hard to predict and hard for AI agents to control precisely.
12
+
13
+ Kitfly’s approach is simpler: a small catalog of **deterministic** building blocks that render predictably inside a slide.
14
+
15
+ ## The two layers
16
+
17
+ ### Shapes (primitives)
18
+
19
+ **Shapes** are atomic building blocks with **no internal layout logic**.
20
+
21
+ They are the “ink” you can draw with:
22
+
23
+ - boxes, circles, diamonds
24
+ - arrows and connectors
25
+ - badges, labels, callouts
26
+
27
+ You (or an agent) decide where they go.
28
+
29
+ ### Figures (deterministic infographic patterns)
30
+
31
+ **Figures** are composed patterns built from shapes.
32
+
33
+ A figure has a known structure (a fixed topology) and a deterministic layout algorithm, such as CSS Grid or flexbox. You fill named **slots**, and the figure handles spacing and alignment inside its bounding box.
34
+
35
+ Examples of figures we expect to support:
36
+
37
+ - timeline
38
+ - layer cake
39
+ - quadrant grid
40
+ - hub-and-spoke
41
+ - funnel
42
+ - cycle wheel
43
+
44
+ ## The boundary rule (simple)
45
+
46
+ If you can enumerate the elements and assign them positions (or slots) at authoring time, it belongs in the **shapes/figures** system.
47
+
48
+ If element positions must be computed from relationships between a variable set of nodes, it belongs in a **diagram engine**.
49
+
50
+ ## Why this helps (especially for AI)
51
+
52
+ - **Predictable output**: “Put this in column 2” is easier than “hope the layout engine does what I meant”.
53
+ - **Slide-quality control**: common business infographics need alignment more than graph theory.
54
+ - **Minimal surface area**: a catalog is easier to learn and easier to audit than a full diagram framework.
55
+
56
+ ## Where this is going
57
+
58
+ This page is the entry point. During the v0.2.x cycle, we’ll extend it with:
59
+
60
+ - a fuller shape list (what exists, what each is for)
61
+ - a figure list (patterns, slot definitions, examples)
62
+ - guidance on when to choose figures vs Mermaid (and when not to)
63
+
64
+ ## What ships now (current)
65
+
66
+ Current core support focuses on **shapes** as `.block` modifiers:
67
+
68
+ - `circle`
69
+ - `pill`
70
+ - `diamond`
71
+ - `chevron`
72
+ - `hexagon`
73
+ - `triangle`
74
+ - `block-arrow`
75
+
76
+ For simple directional storytelling, use `block-flow` with directional shapes.
77
+ General connector routing remains deferred to plugin/engine phases.
78
+
79
+ ## How to use this (today)
80
+
81
+ These examples use plain HTML inside Markdown. That’s intentional: it’s simple, deterministic, and easy for both AI agents and frontend authors to write and review.
82
+
83
+ You can use these classes in slides mode (recommended) and in docs mode when you want a diagram-like block in the middle of a page.
84
+
85
+ ## Live Examples
86
+
87
+ Use the theme toggle in the header to switch light/dark and see the same examples adapt automatically.
88
+
89
+ ### Shape gallery (atomic primitives)
90
+
91
+ <div class="block-grid cols-4">
92
+ <div class="block">box</div>
93
+ <div class="block circle accent">1</div>
94
+ <div class="block pill accent">pill</div>
95
+ <div class="block diamond">diamond</div>
96
+ <div class="block chevron">chevron</div>
97
+ <div class="block hexagon">hex</div>
98
+ <div class="block triangle">tri</div>
99
+ <div class="block block-arrow accent">arrow</div>
100
+ </div>
101
+
102
+ ```html
103
+ <div class="block-grid cols-4">
104
+ <div class="block">box</div>
105
+ <div class="block circle accent">1</div>
106
+ <div class="block pill accent">pill</div>
107
+ <div class="block diamond">diamond</div>
108
+ <div class="block chevron">chevron</div>
109
+ <div class="block hexagon">hex</div>
110
+ <div class="block triangle">tri</div>
111
+ <div class="block block-arrow accent">arrow</div>
112
+ </div>
113
+ ```
114
+
115
+ ### Directional flow (no connector engine)
116
+
117
+ <div class="block-flow">
118
+ <div class="block chevron">Intake</div>
119
+ <div class="block block-arrow accent">Assess</div>
120
+ <div class="block chevron">Plan</div>
121
+ <div class="block block-arrow accent">Ship</div>
122
+ </div>
123
+
124
+ ```html
125
+ <div class="block-flow">
126
+ <div class="block chevron">Intake</div>
127
+ <div class="block block-arrow accent">Assess</div>
128
+ <div class="block chevron">Plan</div>
129
+ <div class="block block-arrow accent">Ship</div>
130
+ </div>
131
+ ```
132
+
133
+ ### Modifier comparison (same base shape, side-by-side)
134
+
135
+ <div class="block-grid cols-4">
136
+ <div class="block">default</div>
137
+ <div class="block accent">accent</div>
138
+ <div class="block outline">outline</div>
139
+ <div class="block muted">muted</div>
140
+ </div>
141
+
142
+ ```html
143
+ <div class="block-grid cols-4">
144
+ <div class="block">default</div>
145
+ <div class="block accent">accent</div>
146
+ <div class="block outline">outline</div>
147
+ <div class="block muted">muted</div>
148
+ </div>
149
+ ```
150
+
151
+ ### Modifier comparison on one shape (circle)
152
+
153
+ <div class="block-grid cols-4">
154
+ <div class="block circle">A</div>
155
+ <div class="block circle accent">A</div>
156
+ <div class="block circle outline">A</div>
157
+ <div class="block circle muted">A</div>
158
+ </div>
159
+
160
+ ```html
161
+ <div class="block-grid cols-4">
162
+ <div class="block circle">A</div>
163
+ <div class="block circle accent">A</div>
164
+ <div class="block circle outline">A</div>
165
+ <div class="block circle muted">A</div>
166
+ </div>
167
+ ```
@@ -0,0 +1,66 @@
1
+ ---
2
+ title: "Environment Variables"
3
+ description: "A beginner-friendly primer (with copy-paste examples)"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Environment Variables
8
+
9
+ An environment variable is a named value your terminal (or hosting platform) provides to a command.
10
+
11
+ Examples:
12
+
13
+ - `PORT=3333`
14
+ - `AWS_PROFILE=my-team`
15
+ - `NETLIFY_AUTH_TOKEN=...`
16
+
17
+ ## Why they matter for deployment
18
+
19
+ Kitfly’s output is static. Deployment tools often need credentials, and environment variables are a common way to provide them without putting secrets in files.
20
+
21
+ Important: don’t commit secrets to git. See:
22
+
23
+ - [Deployment: Secrets and Environment Variables](../deployment/secrets-and-env-vars.html)
24
+
25
+ ## How to set an environment variable
26
+
27
+ ### macOS / Linux (bash, zsh)
28
+
29
+ Set for a single command:
30
+
31
+ ```bash
32
+ MY_VAR="hello" my-command
33
+ ```
34
+
35
+ Set for your current terminal session:
36
+
37
+ ```bash
38
+ export MY_VAR="hello"
39
+ my-command
40
+ ```
41
+
42
+ ### Windows (PowerShell)
43
+
44
+ Set for your current session:
45
+
46
+ ```powershell
47
+ $env:MY_VAR = "hello"
48
+ my-command
49
+ ```
50
+
51
+ ## `.env` files (optional)
52
+
53
+ Some tools can read a `.env` file.
54
+
55
+ If you use one:
56
+
57
+ - keep it local-only
58
+ - make sure it is gitignored
59
+ - consider adding a `.env.example` with placeholder values (safe to commit)
60
+
61
+ ## Quick troubleshooting
62
+
63
+ - If a command says a variable is missing, print it:
64
+ - macOS/Linux: `echo "$MY_VAR"`
65
+ - PowerShell: `echo $env:MY_VAR`
66
+ - If it prints empty, it’s not set in that shell session.
@@ -0,0 +1,92 @@
1
+ ---
2
+ title: "Glossary"
3
+ description: "Quick definitions for common Kitfly terms"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Glossary
8
+
9
+ If you’re new to static sites or developer tooling, this page is for you. It’s okay to not know this stuff yet.
10
+
11
+ ## Site root
12
+
13
+ The folder you run Kitfly commands from. It typically contains `site.yaml` and your `docroot` folder.
14
+
15
+ ## `docroot`
16
+
17
+ The folder Kitfly reads as your documentation source (often `content/`).
18
+
19
+ ## Section
20
+
21
+ A left-nav grouping in Kitfly. In `site.yaml`, each `sections:` entry becomes a navigation section.
22
+
23
+ ## `dist/`
24
+
25
+ The output folder created by `kitfly build` (the folder you deploy).
26
+
27
+ ## Build
28
+
29
+ The `kitfly build` output: a folder of files (`dist/`) intended for hosting on a static site provider.
30
+
31
+ ## Bundle
32
+
33
+ The `kitfly bundle` output: a single HTML file intended for sending (email/Slack/upload) and offline viewing.
34
+
35
+ ## Dev server
36
+
37
+ The local server started by `kitfly dev` for authoring and previewing your docs with hot reload.
38
+
39
+ ## Hot reload
40
+
41
+ When the page refreshes automatically after you edit a file. Kitfly watches your docs and config while the dev server is running.
42
+
43
+ ## Frontmatter
44
+
45
+ Optional YAML metadata at the top of a Markdown file (between `---` lines). Common fields include `title` and `description`.
46
+
47
+ ## Mode
48
+
49
+ Kitfly site layout mode.
50
+
51
+ - `docs` (default): scrolling pages optimized for reading
52
+ - `slides` (v0.2.0+): fixed-aspect slides with keyboard navigation
53
+
54
+ ## Aspect ratio
55
+
56
+ Slides-only setting that controls the shape of the slide frame (for example `16/9` or `4/3`).
57
+
58
+ ## Static hosting
59
+
60
+ Hosting that serves files (HTML/CSS/JS/images) without running your own backend server.
61
+
62
+ ## Theme
63
+
64
+ A set of styling choices for your site (colors, typography, layout details), typically configured in `theme.yaml`.
65
+
66
+ ## Template
67
+
68
+ An optional starting point you can generate with `kitfly init --template ...`. Templates are just folders of Markdown and config you own and can edit.
69
+
70
+ ## Mermaid
71
+
72
+ A diagram syntax that Kitfly can render in the browser (via CDN) for flowcharts, sequence diagrams, and more.
73
+
74
+ ## Prism
75
+
76
+ The syntax highlighter Kitfly uses for code blocks (via CDN).
77
+
78
+ ## CDN
79
+
80
+ Content Delivery Network. A fast way to load shared libraries (like Mermaid/Prism) without bundling them into Kitfly.
81
+
82
+ ## SRI / integrity hash
83
+
84
+ “Subresource Integrity” hashes help browsers verify a CDN file hasn’t been tampered with. You’ll see these as `integrity="sha384-..."` in some setups.
85
+
86
+ ## Environment variable
87
+
88
+ A named value provided to commands and apps by your shell or host platform (often used for secrets).
89
+
90
+ ## Secret
91
+
92
+ A sensitive value (token/key/password) that should not be committed to git and should be stored in a secret manager or environment variable.
@@ -0,0 +1,118 @@
1
+ ---
2
+ title: "Key Concepts"
3
+ description: "Mental models for how Kitfly works"
4
+ last_updated: "2026-02-12"
5
+ ---
6
+
7
+ # Key Concepts
8
+
9
+ Kitfly is intentionally small. If you understand these concepts, you understand the whole tool.
10
+
11
+ ## Site root
12
+
13
+ Your “site root” is the folder you run commands from. It usually contains:
14
+
15
+ - `site.yaml`
16
+ - `content/` (your docs)
17
+
18
+ When you run `kitfly dev`, `kitfly build`, or `kitfly bundle`, you usually run them from your site root.
19
+
20
+ ## `docroot`
21
+
22
+ `docroot` is the folder Kitfly renders into a site.
23
+
24
+ In most projects:
25
+
26
+ - `docroot: "content"`
27
+
28
+ Think of `docroot` as “the folder I’m publishing”.
29
+
30
+ ## Sections
31
+
32
+ Sections are what you see in the left navigation. Each section maps to a folder.
33
+
34
+ In `site.yaml`, it looks like:
35
+
36
+ ```yaml
37
+ sections:
38
+ - name: "Guide"
39
+ path: "guide"
40
+ ```
41
+
42
+ If you point `kitfly` at a folder without a `site.yaml`, Kitfly can auto-discover sections from subfolders (handy for quick previews).
43
+
44
+ ## `dist/` (build output)
45
+
46
+ `kitfly build` produces a static site folder, commonly:
47
+
48
+ - `dist/`
49
+
50
+ You deploy by uploading/syncing `dist/` to a static host.
51
+
52
+ ## Build vs Bundle vs Dev
53
+
54
+ - **Dev** (`kitfly dev`) is for writing: it runs a local server and reloads when files change.
55
+ - **Build** (`kitfly build`) is for hosting: it creates a `dist/` folder you can upload.
56
+ - **Bundle** (`kitfly bundle`) is for sending: it creates a single HTML file you can email or drop in Slack.
57
+
58
+ ## Build vs Bundle
59
+
60
+ - **Build**: outputs a folder (`dist/`) with multiple files (HTML + assets).
61
+ - **Bundle**: outputs a single HTML file you can email or upload (offline-friendly).
62
+
63
+ ## Markdown + frontmatter
64
+
65
+ Kitfly renders Markdown files (`.md`). You can optionally add YAML frontmatter at the top of a file:
66
+
67
+ ```yaml
68
+ ---
69
+ title: "My Page"
70
+ description: "What this page is about"
71
+ ---
72
+ ```
73
+
74
+ Frontmatter is the easiest way to control titles and add metadata without changing your headings.
75
+
76
+ ## Theme (`theme.yaml`)
77
+
78
+ Kitfly themes control the look of your site (colors, typography, layout details). The defaults are meant to be clean and readable.
79
+
80
+ If you don’t want to think about design: don’t touch it.
81
+
82
+ If you do: `theme.yaml` is your main “make it mine” knob.
83
+
84
+ ## Modes: docs vs slides (v0.2.0+)
85
+
86
+ Kitfly can render the same Markdown content in two layouts:
87
+
88
+ - **docs** (default): scrolling pages optimized for reading
89
+ - **slides**: fixed-aspect “one page at a time” slides with keyboard navigation
90
+
91
+ Slides mode is configured in `site.yaml`:
92
+
93
+ ```yaml
94
+ mode: slides
95
+ aspect: "16/9"
96
+ ```
97
+
98
+ ## Assets
99
+
100
+ Kitfly will serve and bundle common “content-adjacent” assets referenced from Markdown, like images and PDFs.
101
+
102
+ Rule of thumb: if it lives next to your docs, Kitfly tries to do the right thing.
103
+
104
+ ## Provenance
105
+
106
+ Kitfly can emit provenance information (version/build date/git info) so you can answer “what did we ship?”.
107
+
108
+ If you see “unversioned”, it usually means your site didn’t set a `version` in `site.yaml` and the current git commit isn’t exactly tagged.
109
+
110
+ ## “Static site” (plain language)
111
+
112
+ A static site is just files. No server-side database, no login, no runtime code required.
113
+
114
+ That’s why Kitfly sites are easy to:
115
+
116
+ - host almost anywhere
117
+ - email as an attachment (bundle)
118
+ - keep offline