kitfly 0.2.1 → 0.2.4
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.
- package/CHANGELOG.md +79 -0
- package/README.md +38 -21
- package/VERSION +1 -1
- package/dist/_raw/content/guide/branding.md +146 -0
- package/dist/_raw/content/guide/data-driven-content.md +204 -0
- package/dist/_raw/content/reference/configuration.md +145 -7
- package/dist/_raw/content/reference/environment-variables.md +26 -1
- package/dist/_raw/content/reference/gantt-widget.md +468 -0
- package/dist/_raw/content/reference/glossary.md +25 -1
- package/dist/_raw/content/reference/key-concepts.md +30 -2
- package/dist/_raw/content/reference/plugins.md +170 -1
- package/dist/_raw/docs/decisions/ADR-0006-data-driven-content.md +350 -0
- package/dist/content/deployment/preflight.html +11 -8
- package/dist/content/deployment/recipes/aws-s3.html +11 -8
- package/dist/content/deployment/recipes/cloudflare-pages.html +11 -8
- package/dist/content/deployment/recipes/cloudflare-r2.html +11 -8
- package/dist/content/deployment/recipes/fly-io.html +11 -8
- package/dist/content/deployment/recipes/github-pages.html +11 -8
- package/dist/content/deployment/recipes/netlify.html +11 -8
- package/dist/content/deployment/recipes/vercel.html +11 -8
- package/dist/content/deployment/secrets-and-env-vars.html +11 -8
- package/dist/content/deployment.html +11 -8
- package/dist/content/guide/approaches.html +11 -8
- package/dist/content/guide/branding.html +509 -0
- package/dist/content/guide/data-driven-content.html +542 -0
- package/dist/content/guide/features.html +11 -8
- package/dist/content/guide/getting-started.html +11 -8
- package/dist/content/guide/kitfly-overview.html +11 -8
- package/dist/content/reference/configuration.html +136 -11
- package/dist/content/reference/design-catalog.html +11 -8
- package/dist/content/reference/environment-variables.html +51 -10
- package/dist/content/reference/gantt-widget.html +899 -0
- package/dist/content/reference/glossary.html +25 -10
- package/dist/content/reference/key-concepts.html +34 -11
- package/dist/content/reference/plugins.html +261 -10
- package/dist/content/reference/slides-authoring-guidelines.html +11 -8
- package/dist/content/reference/structure.html +11 -8
- package/dist/content/reference.html +11 -8
- package/dist/content/templates/crucible.html +11 -8
- package/dist/content/templates/handbook.html +11 -8
- package/dist/content/templates/minimal.html +11 -8
- package/dist/content/templates/overview.html +11 -8
- package/dist/content/templates/pipeline.html +11 -8
- package/dist/content/templates/productbook.html +11 -8
- package/dist/content/templates/runbook.html +11 -8
- package/dist/content/templates/servicebook.html +11 -8
- package/dist/content-index.json +37 -2
- package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +11 -8
- package/dist/docs/decisions/ADR-0002-ai-accessibility.html +11 -8
- package/dist/docs/decisions/ADR-0003-single-file-bundle.html +11 -8
- package/dist/docs/decisions/ADR-0004-bun-runtime.html +11 -8
- package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +11 -8
- package/dist/docs/decisions/ADR-0006-data-driven-content.html +751 -0
- package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +11 -8
- package/dist/docs/decisions/DDR-0002-theme-system.html +11 -8
- package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +11 -8
- package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +11 -8
- package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +11 -8
- package/dist/docs/userguide/cli/build.html +11 -8
- package/dist/docs/userguide/cli/bundle.html +11 -8
- package/dist/docs/userguide/cli/dev.html +11 -8
- package/dist/docs/userguide/cli/init.html +11 -8
- package/dist/docs/userguide/cli/servers.html +11 -8
- package/dist/docs/userguide/cli/stop.html +11 -8
- package/dist/docs/userguide/cli/update.html +11 -8
- package/dist/docs/userguide/cli/version.html +11 -8
- package/dist/docs/userguide/cli.html +11 -8
- package/dist/docs/userguide/sharing.html +11 -8
- package/dist/index.html +11 -8
- package/dist/llms.txt +3 -3
- package/dist/provenance.json +4 -5
- package/dist/reports/license-inventory.csv +199 -0
- package/dist/schemas/plugin-registry.schema.html +11 -8
- package/dist/schemas/plugin-schemas-notes.html +11 -8
- package/dist/schemas/plugin.schema.html +11 -8
- package/dist/schemas/plugins.schema.html +11 -8
- package/dist/schemas/v0/common.schema.html +15 -12
- package/dist/schemas/v0/plugin-registry.schema.html +14 -11
- package/dist/schemas/v0/plugin.schema.html +14 -11
- package/dist/schemas/v0/plugins.schema.html +14 -11
- package/dist/schemas/v0/site.schema.html +68 -9
- package/dist/schemas/v0/theme.schema.html +22 -19
- package/dist/schemas.html +11 -8
- package/dist/styles.css +39 -4
- package/package.json +1 -1
- package/plugins-dist/latex-runtime.js +140 -0
- package/plugins-dist/latex.js +178 -0
- package/plugins-dist/planning-visuals.css +261 -0
- package/plugins-dist/planning-visuals.js +669 -0
- package/plugins-dist/slides-charts-lite-runtime.js +179 -0
- package/plugins-dist/slides-charts-lite.js +198 -0
- package/registry/plugins.yaml +40 -1
- package/schemas/v0/site.schema.json +56 -0
- package/scripts/build-all.ts +5 -0
- package/scripts/build.ts +264 -80
- package/scripts/bundle.ts +188 -17
- package/scripts/dev.ts +294 -171
- package/scripts/embed-docs.ts +119 -0
- package/src/__tests__/brief.test.ts +151 -0
- package/src/__tests__/build.test.ts +293 -1
- package/src/__tests__/bundle.test.ts +195 -0
- package/src/__tests__/docs.test.ts +117 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/bad-month-format.md +10 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/marker-format-mismatch.md +13 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/milestone-format-mismatch.md +13 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/missing-tracks.md +5 -0
- package/src/__tests__/fixtures/fences/planning-visuals/invalid/track-reversed.md +10 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/markers-basic.md +15 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/markers-no-milestones.md +13 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/month-basic.md +16 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/no-milestones.md +10 -0
- package/src/__tests__/fixtures/fences/planning-visuals/valid/week-basic.md +20 -0
- package/src/__tests__/init.test.ts +51 -2
- package/src/__tests__/latex-runtime.bun.test.ts +35 -0
- package/src/__tests__/planning-visuals-fence-contract.test.ts +28 -0
- package/src/__tests__/planning-visuals-runtime-regressions.bun.test.ts +68 -0
- package/src/__tests__/planning-visuals-runtime.bun.test.ts +192 -0
- package/src/__tests__/shared.test.ts +719 -1
- package/src/__tests__/slides-charts-lite-runtime.bun.test.ts +45 -0
- package/src/cli.ts +124 -22
- package/src/commands/docs.ts +71 -0
- package/src/commands/init.ts +1 -1
- package/src/generated/embedded-docs.ts +2384 -0
- package/src/server-registry.ts +50 -10
- package/src/shared.ts +1174 -43
- package/src/site/styles.css +39 -4
- package/src/site/template.html +5 -2
- package/src/templates/brief.ts +486 -0
- package/src/templates/deck.ts +59 -0
- package/src/templates/driver.ts +46 -13
- package/src/templates/handbook.ts +32 -0
- package/src/templates/runbook.ts +32 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Configuration"
|
|
3
3
|
description: "Customize your kitfly site"
|
|
4
|
-
last_updated: "2026-02-
|
|
4
|
+
last_updated: "2026-02-17"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Configuration
|
|
@@ -59,6 +59,18 @@ docroot: "content"
|
|
|
59
59
|
|
|
60
60
|
See [Folder Structure](structure.html) for details.
|
|
61
61
|
|
|
62
|
+
### dataroot (v0.2.3+)
|
|
63
|
+
|
|
64
|
+
Data directory used for frontmatter `data:` bindings.
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
dataroot: "data"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Default: `data`
|
|
71
|
+
|
|
72
|
+
`dataroot` must resolve inside the site root (no `../`, no absolute paths). Data files are loaded at build time and are not copied into output pages.
|
|
73
|
+
|
|
62
74
|
### title
|
|
63
75
|
|
|
64
76
|
Site title. Appears in browser tab and header.
|
|
@@ -100,10 +112,13 @@ brand:
|
|
|
100
112
|
name: "My Project" # Text in header
|
|
101
113
|
url: "/" # Logo link
|
|
102
114
|
logo: "assets/brand/my-logo.png" # Sidebar logo image
|
|
115
|
+
logoDark: "assets/brand/my-logo-dark.png" # Dark mode logo (optional)
|
|
103
116
|
favicon: "assets/brand/favicon-32.png" # Browser tab icon
|
|
104
117
|
external: true # Open in new tab (optional)
|
|
105
118
|
```
|
|
106
119
|
|
|
120
|
+
When `logoDark` is set, kitfly shows it in dark mode instead of applying the default brightness filter. See the [Branding](/content/guide/branding) guide for details on dark mode variants.
|
|
121
|
+
|
|
107
122
|
The logo renders inside a bounded slot that preserves aspect ratio:
|
|
108
123
|
|
|
109
124
|
| Breakpoint | Max Height | Max Width |
|
|
@@ -139,7 +154,7 @@ sections:
|
|
|
139
154
|
| ---------- | ------- | ----- | ------------------------------------------------- |
|
|
140
155
|
| `maxDepth` | 4 | 1–10 | How many directory levels to scan for `.md` files |
|
|
141
156
|
|
|
142
|
-
Deeper sections produce hierarchical sidebar navigation with collapsible groups. Set a lower `maxDepth` for sections where you want a flatter sidebar.
|
|
157
|
+
Deeper sections produce hierarchical sidebar navigation with collapsible groups. This applies to both docs and slides modes — slide decks with subfolder content get nested, collapsible nav while keeping `#slide-N` hash navigation. Set a lower `maxDepth` for sections where you want a flatter sidebar.
|
|
143
158
|
|
|
144
159
|
**Explicit files:** For precise control over which files appear (bypasses auto-discovery):
|
|
145
160
|
|
|
@@ -150,6 +165,51 @@ sections:
|
|
|
150
165
|
files: ["README.md", "CHANGELOG.md"]
|
|
151
166
|
```
|
|
152
167
|
|
|
168
|
+
### profiles (v0.2.3+)
|
|
169
|
+
|
|
170
|
+
Named content profiles for single-source multi-audience filtering.
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
profiles:
|
|
174
|
+
alpha:
|
|
175
|
+
description: "Includes alpha-tagged content"
|
|
176
|
+
include:
|
|
177
|
+
tags: ["alpha"]
|
|
178
|
+
beta:
|
|
179
|
+
description: "Includes beta-tagged content"
|
|
180
|
+
include:
|
|
181
|
+
tags: ["beta"]
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Activate a profile via CLI flag or environment variable:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
kitfly dev ./mysite --profile alpha
|
|
188
|
+
KITFLY_PROFILE=beta kitfly build ./mysite
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Files with a matching `profile:` frontmatter tag are included. Files without a `profile:` field are always included. Tagged files are excluded when no profile is active or when the active profile doesn't match.
|
|
192
|
+
|
|
193
|
+
Sites without `profiles:` in site.yaml are completely unaffected — adding the field has no effect until a profile is explicitly activated.
|
|
194
|
+
|
|
195
|
+
### prebuild (v0.2.3+)
|
|
196
|
+
|
|
197
|
+
Run generator commands before `dev`, `build`, and `bundle`.
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
prebuild:
|
|
201
|
+
- command: "bun run scripts/generate-pricing-data.ts"
|
|
202
|
+
watch: ["data/raw/pricing-input.json"]
|
|
203
|
+
- command: "bun run scripts/generate-team-data.ts"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Rules:
|
|
207
|
+
|
|
208
|
+
- Hooks run sequentially in declared order.
|
|
209
|
+
- Non-zero exit halts the command with hook stderr.
|
|
210
|
+
- In dev mode, `watch:` patterns re-run matching hooks on file changes.
|
|
211
|
+
- Kitfly sets `KITFLY_SITE_ROOT`, `KITFLY_DATA_DIR`, `KITFLY_BUILD_MODE`, and `KITFLY_PROFILE` (when active).
|
|
212
|
+
|
|
153
213
|
### footer
|
|
154
214
|
|
|
155
215
|
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.
|
|
@@ -165,6 +225,11 @@ v0.1.1 · Published 2026-02-10 © 2026 Acme Inc. · acme.com Built with
|
|
|
165
225
|
| `copyrightUrl` | _(none)_ | Makes the copyright text a clickable link |
|
|
166
226
|
| `links` | Your `brand.url` shown as a link | Links after the copyright text (max 10) |
|
|
167
227
|
| `attribution` | `true` | "Built with Kitfly" on the right |
|
|
228
|
+
| `logo` | _(none)_ | Image logo in the footer-left position |
|
|
229
|
+
| `logoDark` | _(none)_ | Dark mode variant of the footer logo |
|
|
230
|
+
| `logoUrl` | _(none)_ | Makes the footer logo a clickable link |
|
|
231
|
+
| `logoAlt` | Copyright text or brand name | Alt text for the footer logo |
|
|
232
|
+
| `logoHeight` | `20` | Max height of footer logo in pixels |
|
|
168
233
|
|
|
169
234
|
**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
235
|
|
|
@@ -205,6 +270,19 @@ When `links` is set, it replaces the default brand URL link. When `links` is omi
|
|
|
205
270
|
|
|
206
271
|
Set `footer.attribution: false` to remove the "Built with Kitfly" text from the footer entirely.
|
|
207
272
|
|
|
273
|
+
**Footer logo** — add an image to the footer ribbon (e.g. a parent company logo):
|
|
274
|
+
|
|
275
|
+
```yaml
|
|
276
|
+
footer:
|
|
277
|
+
logo: "assets/brand/footer-logo.png"
|
|
278
|
+
logoDark: "assets/brand/footer-logo-dark.png"
|
|
279
|
+
logoUrl: "https://example.com"
|
|
280
|
+
logoAlt: "Example Corp"
|
|
281
|
+
logoHeight: 24
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
The footer logo renders at the leading edge of the ribbon, before provenance info. All footer logo fields are optional — if `logo` is omitted, the footer renders as text only. See the [Branding](/content/guide/branding) guide for full details.
|
|
285
|
+
|
|
208
286
|
### theme layout (`theme.yaml`)
|
|
209
287
|
|
|
210
288
|
`theme.yaml` can override layout variables, including sidebar width.
|
|
@@ -232,11 +310,71 @@ last_updated: "2026-02-03"
|
|
|
232
310
|
# Content starts here
|
|
233
311
|
```
|
|
234
312
|
|
|
235
|
-
| Field | Purpose
|
|
236
|
-
| -------------- |
|
|
237
|
-
| `title` | Page title (overrides filename)
|
|
238
|
-
| `description` | Meta description
|
|
239
|
-
| `last_updated` | Shown in page footer
|
|
313
|
+
| Field | Purpose |
|
|
314
|
+
| -------------- | ------------------------------------------------------------------- |
|
|
315
|
+
| `title` | Page title (overrides filename) |
|
|
316
|
+
| `description` | Meta description |
|
|
317
|
+
| `last_updated` | Shown in page footer |
|
|
318
|
+
| `data` | Data file for `{{ key }}` / `{{ snippet:name }}` bindings (v0.2.3+) |
|
|
319
|
+
| `profile` | Profile tag(s) for audience filtering (v0.2.3+) |
|
|
320
|
+
|
|
321
|
+
### `data` frontmatter (v0.2.3+)
|
|
322
|
+
|
|
323
|
+
Bind a page to a data file for value substitution and snippet injection:
|
|
324
|
+
|
|
325
|
+
```yaml
|
|
326
|
+
---
|
|
327
|
+
title: "Pricing"
|
|
328
|
+
data: "data/pricing.yaml"
|
|
329
|
+
---
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
The `data:` path is relative to site root. The data file uses a structured format:
|
|
333
|
+
|
|
334
|
+
```yaml
|
|
335
|
+
globals:
|
|
336
|
+
company: "Acme Corp"
|
|
337
|
+
baseline_rate: "200"
|
|
338
|
+
|
|
339
|
+
pages:
|
|
340
|
+
- path: content/product/pricing.md
|
|
341
|
+
inject:
|
|
342
|
+
hero: "Implementation and operating costs"
|
|
343
|
+
snippets:
|
|
344
|
+
- slot: pricing-table
|
|
345
|
+
content: |
|
|
346
|
+
| Tier | Price |
|
|
347
|
+
|------|-------|
|
|
348
|
+
| Basic | $10/mo |
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**Path convention:** `pages[].path` must be relative to site root including the `content/` prefix — e.g. `content/product/pricing.md`, not `product/pricing.md`.
|
|
352
|
+
|
|
353
|
+
In the markdown body, use `{{ key }}` for value substitution and `{{ snippet:name }}` for block injection. Formatters apply with pipe syntax: `{{ baseline_rate | dollar }}`. See the [Data-Driven Content](/content/guide/data-driven-content) guide for the full formatter reference and generator patterns.
|
|
354
|
+
|
|
355
|
+
Pages without `data:` frontmatter are completely unaffected — literal `{{ }}` text passes through as-is.
|
|
356
|
+
|
|
357
|
+
### `profile` frontmatter (v0.2.3+)
|
|
358
|
+
|
|
359
|
+
Tag a file for profile-based filtering:
|
|
360
|
+
|
|
361
|
+
```yaml
|
|
362
|
+
---
|
|
363
|
+
title: "Engagement Timeline"
|
|
364
|
+
profile: alpha
|
|
365
|
+
---
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Multiple profiles:
|
|
369
|
+
|
|
370
|
+
```yaml
|
|
371
|
+
---
|
|
372
|
+
title: "Shared Appendix"
|
|
373
|
+
profile: [alpha, beta]
|
|
374
|
+
---
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Files without a `profile:` field are always included regardless of which profile is active. See `profiles` in Settings above.
|
|
240
378
|
|
|
241
379
|
## No Configuration
|
|
242
380
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Environment Variables"
|
|
3
3
|
description: "A beginner-friendly primer (with copy-paste examples)"
|
|
4
|
-
last_updated: "2026-02-
|
|
4
|
+
last_updated: "2026-02-17"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Environment Variables
|
|
@@ -58,6 +58,31 @@ If you use one:
|
|
|
58
58
|
- make sure it is gitignored
|
|
59
59
|
- consider adding a `.env.example` with placeholder values (safe to commit)
|
|
60
60
|
|
|
61
|
+
## Kitfly environment variables (v0.2.3+)
|
|
62
|
+
|
|
63
|
+
### `KITFLY_PROFILE`
|
|
64
|
+
|
|
65
|
+
Activate a content profile without the `--profile` CLI flag:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
KITFLY_PROFILE=alpha kitfly build ./mysite
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Equivalent to `kitfly build ./mysite --profile alpha`.
|
|
72
|
+
|
|
73
|
+
### Pre-build hook variables
|
|
74
|
+
|
|
75
|
+
Kitfly sets these before running each `prebuild:` hook:
|
|
76
|
+
|
|
77
|
+
| Variable | Value | Example |
|
|
78
|
+
| ------------------- | ------------------------------- | --------------------------- |
|
|
79
|
+
| `KITFLY_SITE_ROOT` | Absolute path to kitsite root | `/Users/me/my-docs` |
|
|
80
|
+
| `KITFLY_DATA_DIR` | Data directory relative to root | `data/` |
|
|
81
|
+
| `KITFLY_BUILD_MODE` | Current build mode | `dev`, `build`, or `bundle` |
|
|
82
|
+
| `KITFLY_PROFILE` | Active content profile (if any) | `alpha` |
|
|
83
|
+
|
|
84
|
+
These allow generators to adapt behavior per build context — for example, a generator might skip expensive API calls in `dev` mode or produce different output per profile.
|
|
85
|
+
|
|
61
86
|
## Quick troubleshooting
|
|
62
87
|
|
|
63
88
|
- If a command says a variable is missing, print it:
|