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.
- package/CHANGELOG.md +46 -0
- package/README.md +63 -16
- package/VERSION +1 -1
- package/dist/_raw/content/deployment/preflight.md +134 -0
- package/dist/_raw/content/deployment/recipes/aws-s3.md +128 -0
- package/dist/_raw/content/deployment/recipes/cloudflare-pages.md +73 -0
- package/dist/_raw/content/deployment/recipes/cloudflare-r2.md +156 -0
- package/dist/_raw/content/deployment/recipes/fly-io.md +57 -0
- package/dist/_raw/content/deployment/recipes/github-pages.md +112 -0
- package/dist/_raw/content/deployment/recipes/netlify.md +99 -0
- package/dist/_raw/content/deployment/recipes/vercel.md +88 -0
- package/dist/_raw/content/deployment/secrets-and-env-vars.md +75 -0
- package/dist/_raw/content/deployment.md +128 -0
- package/dist/_raw/content/guide/approaches.md +182 -0
- package/dist/_raw/content/guide/features.md +121 -0
- package/dist/_raw/content/guide/getting-started.md +112 -0
- package/dist/_raw/content/guide/kitfly-overview.md +209 -0
- package/dist/_raw/content/reference/configuration.md +259 -0
- package/dist/_raw/content/reference/design-catalog.md +167 -0
- package/dist/_raw/content/reference/environment-variables.md +66 -0
- package/dist/_raw/content/reference/glossary.md +92 -0
- package/dist/_raw/content/reference/key-concepts.md +118 -0
- package/dist/_raw/content/reference/plugins.md +220 -0
- package/dist/_raw/content/reference/slides-authoring-guidelines.md +129 -0
- package/dist/_raw/content/reference/structure.md +166 -0
- package/dist/_raw/content/reference.md +20 -0
- package/dist/_raw/content/templates/crucible.md +192 -0
- package/dist/_raw/content/templates/handbook.md +83 -0
- package/dist/_raw/content/templates/minimal.md +138 -0
- package/dist/_raw/content/templates/overview.md +187 -0
- package/dist/_raw/content/templates/pipeline.md +151 -0
- package/dist/_raw/content/templates/productbook.md +187 -0
- package/dist/_raw/content/templates/runbook.md +193 -0
- package/dist/_raw/content/templates/servicebook.md +163 -0
- package/dist/_raw/docs/decisions/ADR-0001-minimalist-site-code.md +118 -0
- package/dist/_raw/docs/decisions/ADR-0002-ai-accessibility.md +153 -0
- package/dist/_raw/docs/decisions/ADR-0003-single-file-bundle.md +93 -0
- package/dist/_raw/docs/decisions/ADR-0004-bun-runtime.md +98 -0
- package/dist/_raw/docs/decisions/ADR-0005-plugin-contract-and-distribution.md +110 -0
- package/dist/_raw/docs/decisions/DDR-0001-viewport-locked-layout.md +111 -0
- package/dist/_raw/docs/decisions/DDR-0002-theme-system.md +131 -0
- package/dist/_raw/docs/decisions/DDR-0003-bounded-logo-slot.md +106 -0
- package/dist/_raw/docs/decisions/DDR-0004-slides-rendering-model.md +113 -0
- package/dist/_raw/docs/decisions/DDR-0005-deterministic-layout-boundary.md +107 -0
- package/dist/_raw/docs/userguide/cli/build.md +85 -0
- package/dist/_raw/docs/userguide/cli/bundle.md +81 -0
- package/dist/_raw/docs/userguide/cli/dev.md +92 -0
- package/dist/_raw/docs/userguide/cli/init.md +116 -0
- package/dist/_raw/docs/userguide/cli/servers.md +69 -0
- package/dist/_raw/docs/userguide/cli/stop.md +76 -0
- package/dist/_raw/docs/userguide/cli/update.md +78 -0
- package/dist/_raw/docs/userguide/cli/version.md +65 -0
- package/dist/_raw/docs/userguide/cli.md +34 -0
- package/dist/_raw/docs/userguide/sharing.md +94 -0
- package/dist/_raw/schemas/plugin-schemas-notes.md +71 -0
- package/dist/_raw/schemas.md +42 -0
- package/dist/assets/brand/kitfly-favicon-32.png +0 -0
- package/dist/assets/brand/kitfly-icon-64.png +0 -0
- package/dist/assets/brand/kitfly-logo-128.png +0 -0
- package/dist/assets/brand/kitfly-logo-512.png +0 -0
- package/dist/assets/brand/kitfly-logo.svg +12132 -0
- package/dist/assets/brand/kitfly-neon-128.png +0 -0
- package/dist/assets/brand/kitfly-neon-192.png +0 -0
- package/dist/assets/brand/kitfly-neon-256.png +0 -0
- package/dist/assets/brand/kitfly-neon.png +0 -0
- package/dist/assets/brand/palette.md +75 -0
- package/dist/content/deployment/index.html +11 -0
- package/dist/content/deployment/preflight.html +418 -0
- package/dist/content/deployment/recipes/aws-s3.html +421 -0
- package/dist/content/deployment/recipes/cloudflare-pages.html +372 -0
- package/dist/content/deployment/recipes/cloudflare-r2.html +443 -0
- package/dist/content/deployment/recipes/fly-io.html +356 -0
- package/dist/content/deployment/recipes/github-pages.html +414 -0
- package/dist/content/deployment/recipes/index.html +11 -0
- package/dist/content/deployment/recipes/netlify.html +394 -0
- package/dist/content/deployment/recipes/vercel.html +382 -0
- package/dist/content/deployment/secrets-and-env-vars.html +380 -0
- package/dist/content/deployment.html +426 -0
- package/dist/content/guide/approaches.html +501 -0
- package/dist/content/guide/features.html +436 -0
- package/dist/content/guide/getting-started.html +403 -0
- package/dist/content/guide/index.html +11 -0
- package/dist/content/guide/kitfly-overview.html +544 -0
- package/dist/content/index.html +11 -0
- package/dist/content/reference/configuration.html +580 -0
- package/dist/content/reference/design-catalog.html +449 -0
- package/dist/content/reference/environment-variables.html +367 -0
- package/dist/content/reference/glossary.html +368 -0
- package/dist/content/reference/index.html +11 -0
- package/dist/content/reference/key-concepts.html +399 -0
- package/dist/content/reference/plugins.html +491 -0
- package/dist/content/reference/slides-authoring-guidelines.html +418 -0
- package/dist/content/reference/structure.html +463 -0
- package/dist/content/reference.html +335 -0
- package/dist/content/templates/crucible.html +546 -0
- package/dist/content/templates/handbook.html +405 -0
- package/dist/content/templates/index.html +11 -0
- package/dist/content/templates/minimal.html +447 -0
- package/dist/content/templates/overview.html +558 -0
- package/dist/content/templates/pipeline.html +494 -0
- package/dist/content/templates/productbook.html +540 -0
- package/dist/content/templates/runbook.html +543 -0
- package/dist/content/templates/servicebook.html +523 -0
- package/dist/content-index.json +549 -0
- package/dist/docs/decisions/ADR-0001-minimalist-site-code.html +491 -0
- package/dist/docs/decisions/ADR-0002-ai-accessibility.html +434 -0
- package/dist/docs/decisions/ADR-0003-single-file-bundle.html +412 -0
- package/dist/docs/decisions/ADR-0004-bun-runtime.html +409 -0
- package/dist/docs/decisions/ADR-0005-plugin-contract-and-distribution.html +402 -0
- package/dist/docs/decisions/DDR-0001-viewport-locked-layout.html +459 -0
- package/dist/docs/decisions/DDR-0002-theme-system.html +452 -0
- package/dist/docs/decisions/DDR-0003-bounded-logo-slot.html +423 -0
- package/dist/docs/decisions/DDR-0004-slides-rendering-model.html +399 -0
- package/dist/docs/decisions/DDR-0005-deterministic-layout-boundary.html +422 -0
- package/dist/docs/decisions/index.html +11 -0
- package/dist/docs/userguide/cli/build.html +408 -0
- package/dist/docs/userguide/cli/bundle.html +419 -0
- package/dist/docs/userguide/cli/dev.html +428 -0
- package/dist/docs/userguide/cli/index.html +11 -0
- package/dist/docs/userguide/cli/init.html +436 -0
- package/dist/docs/userguide/cli/servers.html +393 -0
- package/dist/docs/userguide/cli/stop.html +408 -0
- package/dist/docs/userguide/cli/update.html +406 -0
- package/dist/docs/userguide/cli/version.html +406 -0
- package/dist/docs/userguide/cli.html +386 -0
- package/dist/docs/userguide/index.html +11 -0
- package/dist/docs/userguide/sharing.html +465 -0
- package/dist/index.html +387 -0
- package/dist/llms.txt +18 -0
- package/dist/provenance.json +7 -0
- package/dist/schemas/index.html +11 -0
- package/dist/schemas/plugin-registry.schema.html +327 -0
- package/dist/schemas/plugin-schemas-notes.html +364 -0
- package/dist/schemas/plugin.schema.html +327 -0
- package/dist/schemas/plugins.schema.html +327 -0
- package/dist/schemas/v0/common.schema.html +386 -0
- package/dist/schemas/v0/index.html +11 -0
- package/dist/schemas/v0/plugin-registry.schema.html +547 -0
- package/dist/schemas/v0/plugin.schema.html +497 -0
- package/dist/schemas/v0/plugins.schema.html +406 -0
- package/dist/schemas/v0/site.schema.html +541 -0
- package/dist/schemas/v0/theme.schema.html +615 -0
- package/dist/schemas.html +351 -0
- package/dist/styles.css +1262 -0
- package/package.json +4 -2
- package/plugins-dist/callouts.css +32 -0
- package/plugins-dist/callouts.js +46 -0
- package/plugins-dist/slides-visuals.css +390 -0
- package/plugins-dist/slides-visuals.js +689 -0
- package/registry/plugins.yaml +35 -0
- package/schemas/README.md +10 -0
- package/schemas/plugin-registry.schema.json +5 -0
- package/schemas/plugin-schemas-notes.md +71 -0
- package/schemas/plugin.schema.json +5 -0
- package/schemas/plugins.schema.json +5 -0
- package/schemas/v0/common.schema.json +64 -0
- package/schemas/v0/plugin-registry.schema.json +225 -0
- package/schemas/v0/plugin.schema.json +175 -0
- package/schemas/v0/plugins.schema.json +84 -0
- package/schemas/v0/site.schema.json +56 -9
- package/schemas/v0/theme.schema.json +105 -22
- package/scripts/build.ts +158 -3
- package/scripts/bundle.ts +261 -95
- package/scripts/dev.ts +301 -11
- package/src/__tests__/build.test.ts +220 -1
- package/src/__tests__/bundle.test.ts +31 -0
- package/src/__tests__/cli.test.ts +14 -3
- package/src/__tests__/dev-plugin-errors.test.ts +20 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/bad-list-indent.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/blank-line.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/compare-object-items.md +9 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/flow-branching-no-source.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/flow-converging-no-target.md +6 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/indented-fence.md +4 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/staircase-empty-steps.md +3 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/stat-grid-missing-fields.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/timeline-horizontal-no-events.md +2 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/unknown-type.md +3 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/compare.md +10 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/comparison-table.md +14 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-branching-no-split.md +7 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-branching.md +8 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-converging-no-merge.md +7 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/flow-converging.md +8 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/funnel.md +7 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/kpi.md +5 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/layer-cake.md +6 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/pyramid.md +6 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/quadrant-grid.md +8 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/scorecard.md +13 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/staircase-down.md +7 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/staircase.md +8 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/stat-grid.md +8 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/timeline-horizontal.md +9 -0
- package/src/__tests__/fixtures/fences/slides-visuals/valid/timeline-vertical.md +10 -0
- package/src/__tests__/init.test.ts +35 -0
- package/src/__tests__/plugin-loader.test.ts +221 -0
- package/src/__tests__/shared.test.ts +451 -0
- package/src/__tests__/slides-visuals-fence-contract.test.ts +28 -0
- package/src/__tests__/slides-visuals-runtime-regressions.bun.test.ts +147 -0
- package/src/__tests__/styles.test.ts +35 -0
- package/src/cli.ts +9 -4
- package/src/plugin-loader.ts +245 -0
- package/src/shared.ts +650 -7
- package/src/site/styles.css +331 -0
- package/src/site/template.html +66 -5
- package/src/templates/deck.ts +186 -0
- package/src/templates/driver.ts +11 -1
- package/src/templates/minimal.ts +1 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Plugins"
|
|
3
|
+
description: "Enable small add-ons (CSS/JS) for docs and slides"
|
|
4
|
+
last_updated: "2026-02-12"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plugins
|
|
8
|
+
|
|
9
|
+
Kitfly plugins are small, optional add-ons that inject CSS and/or JS into your generated HTML.
|
|
10
|
+
|
|
11
|
+
They are designed to stay minimal:
|
|
12
|
+
|
|
13
|
+
- No build pipeline required
|
|
14
|
+
- Offline-friendly when assets are local
|
|
15
|
+
- You own the files (standalone sites copy `registry/` + `plugins-dist/`)
|
|
16
|
+
|
|
17
|
+
## Enable a plugin
|
|
18
|
+
|
|
19
|
+
Create `kitfly.plugins.yaml` in your site root:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
# yaml-language-server: $schema=./schemas/v0/plugins.schema.json
|
|
23
|
+
plugins:
|
|
24
|
+
- callouts@0.2.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Canonical plugins are referenced as pinned strings: `name@x.y.z`.
|
|
28
|
+
|
|
29
|
+
## Registry + assets
|
|
30
|
+
|
|
31
|
+
Canonical plugins come from a registry file:
|
|
32
|
+
|
|
33
|
+
- Site registry: `registry/plugins.yaml` (preferred if present)
|
|
34
|
+
- Engine registry: used as a fallback when the site does not include a registry
|
|
35
|
+
|
|
36
|
+
Registry entries map a plugin id + version to asset locations (`assets.js` and/or `assets.css`) and per-asset checksums (`assetSha256`).
|
|
37
|
+
|
|
38
|
+
For local/offline registries, `baseUrl` may be an empty string.
|
|
39
|
+
|
|
40
|
+
## Mode allowlist (`modes`)
|
|
41
|
+
|
|
42
|
+
Registry entries may include an optional `modes` allowlist to control where a plugin runs:
|
|
43
|
+
|
|
44
|
+
- Omitted: allowed in `docs` and `slides`
|
|
45
|
+
- Present with values: allowed only in those modes (example: `["slides"]`)
|
|
46
|
+
- Present but empty (`[]`): blocked in all modes (quick disable switch)
|
|
47
|
+
|
|
48
|
+
Example:
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
plugins:
|
|
52
|
+
slides-widgets:
|
|
53
|
+
version: "0.2.0"
|
|
54
|
+
modes: ["slides"]
|
|
55
|
+
assets:
|
|
56
|
+
js: "plugins-dist/slides-widgets.js"
|
|
57
|
+
assetSha256:
|
|
58
|
+
js: "sha256:..."
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Integrity checks
|
|
62
|
+
|
|
63
|
+
Kitfly verifies every enabled asset against its `sha256:<hex>` checksum. If a checksum does not match, the build/dev server fails with an integrity error.
|
|
64
|
+
|
|
65
|
+
When iterating on a local plugin (for example, editing `plugins-dist/slides-visuals.js`), you must also update the matching `assetSha256` in `registry/plugins.yaml` (or disable the plugin) for Kitfly to load it.
|
|
66
|
+
|
|
67
|
+
## Triple-colon fence contract (`slides-visuals`)
|
|
68
|
+
|
|
69
|
+
The `slides-visuals` plugin adds a `:::` block syntax for slides mode (widgets + figures).
|
|
70
|
+
|
|
71
|
+
To keep authoring predictable and make errors actionable, Kitfly defines a strict contract for these blocks.
|
|
72
|
+
When `slides-visuals` is enabled, Kitfly validates blocks before rendering and reports contract violations.
|
|
73
|
+
|
|
74
|
+
### Valid block shape
|
|
75
|
+
|
|
76
|
+
- Opening fence: `:::<type>` **must** start at column 0 and be the only content on the line.
|
|
77
|
+
- Closing fence: `:::` **must** start at column 0 and be the only content on the line.
|
|
78
|
+
- No blank lines inside a `:::` block.
|
|
79
|
+
- Content is a narrow YAML subset:
|
|
80
|
+
- Scalar: `key: value`
|
|
81
|
+
- List: `key:` followed by list items
|
|
82
|
+
- List item start: exactly two spaces, then `- ` (example: `␠␠- label: Users`)
|
|
83
|
+
- Continuation lines (object fields): exactly four spaces, then `field: value`
|
|
84
|
+
|
|
85
|
+
### Supported types
|
|
86
|
+
|
|
87
|
+
Widgets:
|
|
88
|
+
|
|
89
|
+
- `kpi` (scalar keys: `label`, `value`, optional `trend`)
|
|
90
|
+
- `stat-grid` (list key: `metrics` of `{label,value,trend?}` objects)
|
|
91
|
+
- `compare` (scalar keys: `left-title`, `right-title`; list keys: `left`, `right` as **strings only**)
|
|
92
|
+
|
|
93
|
+
Notes:
|
|
94
|
+
|
|
95
|
+
- `compare.left` and `compare.right` items are simple strings (not `{label: ..., value: ...}` objects).
|
|
96
|
+
- If you need multi-field items, use `stat-grid` / `scorecard` instead.
|
|
97
|
+
- If an item contains a colon (`:`), quote it as a string.
|
|
98
|
+
|
|
99
|
+
Figures:
|
|
100
|
+
|
|
101
|
+
- `quadrant-grid` (scalar keys: `axis-x`, `axis-y`, `tl`, `tr`, `bl`, `br`)
|
|
102
|
+
- `scorecard` (list key: `metrics` of `{label,value,trend?}` objects)
|
|
103
|
+
- `comparison-table` (list keys: `headers` (strings), `rows` (strings))
|
|
104
|
+
- `layer-cake` (list key: `layers` (strings))
|
|
105
|
+
- `pyramid` (list key: `levels` (strings))
|
|
106
|
+
- `funnel` (list key: `stages` (strings))
|
|
107
|
+
|
|
108
|
+
### Example (valid)
|
|
109
|
+
|
|
110
|
+
```markdown
|
|
111
|
+
:::stat-grid
|
|
112
|
+
metrics:
|
|
113
|
+
|
|
114
|
+
- label: Users
|
|
115
|
+
value: 1,234
|
|
116
|
+
- label: Uptime
|
|
117
|
+
value: 99.95%
|
|
118
|
+
trend: +0.3%
|
|
119
|
+
:::
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### How to know it’s correct
|
|
123
|
+
|
|
124
|
+
When `slides-visuals@...` is enabled, Kitfly validates your `:::` blocks before it renders pages.
|
|
125
|
+
|
|
126
|
+
You know your fences are valid if:
|
|
127
|
+
|
|
128
|
+
- `kitfly dev` starts successfully, and pages load normally
|
|
129
|
+
- `kitfly build` completes successfully
|
|
130
|
+
- `kitfly bundle` completes successfully
|
|
131
|
+
|
|
132
|
+
If a block is invalid, Kitfly will fail fast with an error that points to the file and the specific contract rule you violated.
|
|
133
|
+
|
|
134
|
+
### Common mistakes (and how to fix them)
|
|
135
|
+
|
|
136
|
+
- **Indented fences**: `:::kpi` must start at column 0 (no spaces, no list indentation, no blockquote `>`).
|
|
137
|
+
- **Blank lines inside the block**: remove empty lines between keys/items.
|
|
138
|
+
- **Wrong list indentation**:
|
|
139
|
+
- list items must start with exactly two spaces then `- `
|
|
140
|
+
- fields under an item must use exactly four spaces
|
|
141
|
+
- **Unknown type**: the opening fence `:::<type>` must be one of the supported types.
|
|
142
|
+
|
|
143
|
+
### Examples (invalid → fixed)
|
|
144
|
+
|
|
145
|
+
#### 1) Indented fence (invalid)
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
:::kpi
|
|
149
|
+
label: Users
|
|
150
|
+
value: 1,234
|
|
151
|
+
:::
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Fixed:
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
:::kpi
|
|
158
|
+
label: Users
|
|
159
|
+
value: 1,234
|
|
160
|
+
:::
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### 2) Blank line inside block (invalid)
|
|
164
|
+
|
|
165
|
+
```markdown
|
|
166
|
+
:::kpi
|
|
167
|
+
label: Users
|
|
168
|
+
|
|
169
|
+
value: 1,234
|
|
170
|
+
:::
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Fixed:
|
|
174
|
+
|
|
175
|
+
```markdown
|
|
176
|
+
:::kpi
|
|
177
|
+
label: Users
|
|
178
|
+
value: 1,234
|
|
179
|
+
:::
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
#### 3) Bad list indentation (invalid)
|
|
183
|
+
|
|
184
|
+
```markdown
|
|
185
|
+
:::stat-grid
|
|
186
|
+
metrics:
|
|
187
|
+
|
|
188
|
+
- label: Users
|
|
189
|
+
value: 1,234
|
|
190
|
+
:::
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Fixed:
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
:::stat-grid
|
|
197
|
+
metrics:
|
|
198
|
+
|
|
199
|
+
- label: Users
|
|
200
|
+
value: 1,234
|
|
201
|
+
:::
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
#### 4) Unknown type (invalid)
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
:::stats
|
|
208
|
+
label: Users
|
|
209
|
+
value: 1,234
|
|
210
|
+
:::
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Fixed: use a supported type (for example `kpi`):
|
|
214
|
+
|
|
215
|
+
```markdown
|
|
216
|
+
:::kpi
|
|
217
|
+
label: Users
|
|
218
|
+
value: 1,234
|
|
219
|
+
:::
|
|
220
|
+
```
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Slides Authoring Guidelines"
|
|
3
|
+
description: "Practical density and layout rules for reliable Kitfly slides"
|
|
4
|
+
last_updated: "2026-02-15"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Slides Authoring Guidelines
|
|
8
|
+
|
|
9
|
+
This page is for slide authors and AI agents generating slide content.
|
|
10
|
+
|
|
11
|
+
Goal: avoid common layouts that look broken but are actually content-density issues.
|
|
12
|
+
|
|
13
|
+
## Quick rules
|
|
14
|
+
|
|
15
|
+
- Keep vertical visuals short. If a slide is tall and busy, trim items before adding more styling.
|
|
16
|
+
- Treat highlighted (`.accent`) blocks as emphasis, not interaction.
|
|
17
|
+
- Scroll in slides mode is allowed for dense content. Prefer no scroll for presentation slides.
|
|
18
|
+
|
|
19
|
+
## DF-006: Single `.accent` in `.block-grid` looks like a tab
|
|
20
|
+
|
|
21
|
+
### Problem
|
|
22
|
+
|
|
23
|
+
When one block in a row is accented and others are not, users read it as a selected tab and expect click behavior.
|
|
24
|
+
|
|
25
|
+
### Do this
|
|
26
|
+
|
|
27
|
+
- In one grid row, accent all blocks or accent none.
|
|
28
|
+
- If you need real tabs, treat that as a future widget (`slides-widgets`), not static blocks.
|
|
29
|
+
|
|
30
|
+
### Avoid this
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<div class="block-grid cols-3">
|
|
34
|
+
<div class="block">Backend</div>
|
|
35
|
+
<div class="block accent">Platform</div>
|
|
36
|
+
<div class="block">SRE</div>
|
|
37
|
+
</div>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Prefer this
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<div class="block-grid cols-3">
|
|
44
|
+
<div class="block accent">Backend</div>
|
|
45
|
+
<div class="block accent">Platform</div>
|
|
46
|
+
<div class="block accent">SRE</div>
|
|
47
|
+
</div>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
or
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<div class="block-grid cols-3">
|
|
54
|
+
<div class="block">Backend</div>
|
|
55
|
+
<div class="block">Platform</div>
|
|
56
|
+
<div class="block">SRE</div>
|
|
57
|
+
</div>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## DF-007: `block-flow.vertical` can overflow at 4/3
|
|
61
|
+
|
|
62
|
+
### Problem
|
|
63
|
+
|
|
64
|
+
`.block-flow.vertical` (HTML: `class="block-flow vertical"`) with 4 steps can exceed the visible frame at `4/3`.
|
|
65
|
+
|
|
66
|
+
### Do this
|
|
67
|
+
|
|
68
|
+
- At `4/3`: limit vertical flows to 3 blocks.
|
|
69
|
+
- At `16/9`: 4 blocks is usually fine.
|
|
70
|
+
- If the slide also has extra text/callouts, reduce steps further.
|
|
71
|
+
|
|
72
|
+
### Guidance
|
|
73
|
+
|
|
74
|
+
- If you must keep all steps, scroll is acceptable.
|
|
75
|
+
- For presentation-first slides, split into two slides instead.
|
|
76
|
+
|
|
77
|
+
### Example target
|
|
78
|
+
|
|
79
|
+
```html
|
|
80
|
+
<div class="block-flow vertical">
|
|
81
|
+
<div class="block">1. Intake</div>
|
|
82
|
+
<div class="block">2. Validate</div>
|
|
83
|
+
<div class="block">3. Ship</div>
|
|
84
|
+
</div>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## DF-014: `timeline-vertical` + callout can clip at 16/9
|
|
88
|
+
|
|
89
|
+
### Problem
|
|
90
|
+
|
|
91
|
+
A 5-event vertical timeline plus a callout often exceeds the frame at `16/9`.
|
|
92
|
+
|
|
93
|
+
### Do this
|
|
94
|
+
|
|
95
|
+
- At `16/9`: keep `timeline-vertical` to 4 events when the slide also has a callout.
|
|
96
|
+
- At `4/3`: keep to 3 events with a callout.
|
|
97
|
+
- If you need all events, remove the callout or move it to a follow-up slide.
|
|
98
|
+
|
|
99
|
+
### Example (safe with callout)
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
:::timeline-vertical
|
|
103
|
+
events:
|
|
104
|
+
- label: "Detect"
|
|
105
|
+
date: "09:15"
|
|
106
|
+
- label: "Triage"
|
|
107
|
+
date: "09:24"
|
|
108
|
+
- label: "Mitigate"
|
|
109
|
+
date: "09:42"
|
|
110
|
+
- label: "Recover"
|
|
111
|
+
date: "10:08"
|
|
112
|
+
:::
|
|
113
|
+
|
|
114
|
+
> WARNING: External API fallback remained active for 12 minutes.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Aspect ratio checklist
|
|
118
|
+
|
|
119
|
+
- `16/9`: medium density, but still cap long vertical stacks.
|
|
120
|
+
- `4/3`: tighter vertical budget. Reduce stacked items first.
|
|
121
|
+
- `16/10`: between `16/9` and `4/3`; apply the same conservative limits when callouts are present.
|
|
122
|
+
|
|
123
|
+
## Summary
|
|
124
|
+
|
|
125
|
+
These are authoring constraints, not renderer bugs. When a slide clips:
|
|
126
|
+
|
|
127
|
+
1. Reduce vertical item count.
|
|
128
|
+
2. Remove or move callouts.
|
|
129
|
+
3. Split dense content across two slides.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Folder Structure"
|
|
3
|
+
description: "What lives where in a kitfly project"
|
|
4
|
+
last_updated: "2026-02-03"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Folder Structure
|
|
8
|
+
|
|
9
|
+
Understanding what's in the template and what ends up in your built site.
|
|
10
|
+
|
|
11
|
+
## Template Repository
|
|
12
|
+
|
|
13
|
+
When you clone kitfly, you get:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
kitfly/
|
|
17
|
+
├── content/ # YOUR DOCS
|
|
18
|
+
│ ├── index.md # Home page
|
|
19
|
+
│ ├── guide/ # Guide section
|
|
20
|
+
│ └── reference/ # Reference section
|
|
21
|
+
│
|
|
22
|
+
├── src/ # RENDERING MACHINERY
|
|
23
|
+
│ ├── cli.ts # CLI entry point
|
|
24
|
+
│ ├── commands/ # CLI commands
|
|
25
|
+
│ └── site/ # HTML template + CSS
|
|
26
|
+
│
|
|
27
|
+
├── scripts/ # BUILD SCRIPTS
|
|
28
|
+
│ ├── dev.ts # Dev server
|
|
29
|
+
│ └── build.ts # Static build
|
|
30
|
+
│
|
|
31
|
+
├── assets/ # BRAND ASSETS
|
|
32
|
+
│ └── brand/ # Logo, favicon
|
|
33
|
+
│
|
|
34
|
+
├── dist/ # BUILD OUTPUT (gitignored)
|
|
35
|
+
│
|
|
36
|
+
├── .plans/ # PLANNING (gitignored)
|
|
37
|
+
│
|
|
38
|
+
├── site.yaml # CONFIGURATION
|
|
39
|
+
├── package.json # Dependencies
|
|
40
|
+
├── VERSION # Version number
|
|
41
|
+
├── README.md # GitHub readme
|
|
42
|
+
├── AGENTS.md # AI agent guide
|
|
43
|
+
└── LICENSE # MIT license
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## What Gets Built
|
|
47
|
+
|
|
48
|
+
When you run `bun run build`, **only content from `docroot` goes into `dist/`**:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
dist/
|
|
52
|
+
├── index.html # From content/index.md
|
|
53
|
+
├── guide/
|
|
54
|
+
│ ├── index.html # Redirect to first file
|
|
55
|
+
│ ├── approaches.html # From content/guide/approaches.md
|
|
56
|
+
│ ├── getting-started.html
|
|
57
|
+
│ └── features.html
|
|
58
|
+
├── reference/
|
|
59
|
+
│ ├── index.html # Redirect to first file
|
|
60
|
+
│ ├── configuration.html
|
|
61
|
+
│ └── structure.html
|
|
62
|
+
├── styles.css # From src/site/styles.css
|
|
63
|
+
├── provenance.json # Build metadata
|
|
64
|
+
└── assets/ # Copied from assets/
|
|
65
|
+
└── brand/
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Not in dist/:**
|
|
69
|
+
|
|
70
|
+
- `src/` - rendering code
|
|
71
|
+
- `scripts/` - build scripts
|
|
72
|
+
- `README.md` - GitHub readme
|
|
73
|
+
- `AGENTS.md` - AI guide
|
|
74
|
+
- `package.json` - dependencies
|
|
75
|
+
- `.plans/` - planning files
|
|
76
|
+
- Any other repo files
|
|
77
|
+
|
|
78
|
+
This separation is intentional. Your built site is just documentation - no tooling artifacts.
|
|
79
|
+
|
|
80
|
+
## The docroot Setting
|
|
81
|
+
|
|
82
|
+
In `site.yaml`:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
docroot: "content"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This tells kitfly where to look for markdown files. Options:
|
|
89
|
+
|
|
90
|
+
| Setting | Effect |
|
|
91
|
+
| ----------- | ------------------------------------------ |
|
|
92
|
+
| `"content"` | Render from `content/` (recommended) |
|
|
93
|
+
| `"docs"` | Render from `docs/` (common in code repos) |
|
|
94
|
+
| `"."` | Render from repo root (use with care) |
|
|
95
|
+
|
|
96
|
+
### Why This Matters
|
|
97
|
+
|
|
98
|
+
With `docroot: "content"`:
|
|
99
|
+
|
|
100
|
+
- Your `README.md` stays on GitHub, not in the docs
|
|
101
|
+
- Your `package.json` isn't exposed
|
|
102
|
+
- You can have code, tests, and docs in the same repo
|
|
103
|
+
|
|
104
|
+
With `docroot: "."`:
|
|
105
|
+
|
|
106
|
+
- Everything in the repo root becomes documentation
|
|
107
|
+
- Useful for pure documentation repos
|
|
108
|
+
- You'll want to configure `sections` explicitly
|
|
109
|
+
|
|
110
|
+
## Customizing the Template
|
|
111
|
+
|
|
112
|
+
### The Machinery
|
|
113
|
+
|
|
114
|
+
If you want to modify how kitfly renders:
|
|
115
|
+
|
|
116
|
+
- **HTML template:** `src/site/template.html`
|
|
117
|
+
- **Styles:** `src/site/styles.css`
|
|
118
|
+
- **Dev server:** `scripts/dev.ts`
|
|
119
|
+
- **Build script:** `scripts/build.ts`
|
|
120
|
+
|
|
121
|
+
These are ~500 lines total. Read them, understand them, modify if needed.
|
|
122
|
+
|
|
123
|
+
### Brand Assets
|
|
124
|
+
|
|
125
|
+
Replace files in `assets/brand/`:
|
|
126
|
+
|
|
127
|
+
- `kitfly-logo.svg` - Vector logo (ensure tight viewBox)
|
|
128
|
+
- `kitfly-logo-512.png` - Used in README
|
|
129
|
+
- `kitfly-logo-128.png` - Sidebar header fallback
|
|
130
|
+
- `kitfly-favicon-32.png` - Browser favicon
|
|
131
|
+
|
|
132
|
+
These are copied to `dist/assets/` during build.
|
|
133
|
+
|
|
134
|
+
## For Different Use Cases
|
|
135
|
+
|
|
136
|
+
### Documentation alongside code
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
my-project/
|
|
140
|
+
├── src/ # Your code
|
|
141
|
+
├── tests/ # Your tests
|
|
142
|
+
├── docs/ # Your documentation
|
|
143
|
+
│ ├── index.md
|
|
144
|
+
│ └── api/
|
|
145
|
+
└── site.yaml # docroot: "docs"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Pure documentation repo
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
my-docs/
|
|
152
|
+
├── index.md
|
|
153
|
+
├── guides/
|
|
154
|
+
├── reference/
|
|
155
|
+
└── site.yaml # docroot: "."
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Existing markdown
|
|
159
|
+
|
|
160
|
+
Point kitfly at any folder:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
kitfly dev ./path/to/markdown
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
No need to restructure anything.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference"
|
|
3
|
+
description: "Key concepts and lookup docs for Kitfly"
|
|
4
|
+
last_updated: "2026-02-12"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Reference
|
|
8
|
+
|
|
9
|
+
Use this section when you want quick definitions, mental models, and “what does this setting mean?” answers.
|
|
10
|
+
|
|
11
|
+
## Start here
|
|
12
|
+
|
|
13
|
+
- [Configuration](content/reference/configuration.html) — `site.yaml` and common settings
|
|
14
|
+
- [Plugins](content/reference/plugins.html) — enable small CSS/JS add-ons
|
|
15
|
+
- [Structure](content/reference/structure.html) — recommended folder layout and conventions
|
|
16
|
+
- [Environment Variables](content/reference/environment-variables.html) — what they are and how to set them
|
|
17
|
+
- [Key Concepts](content/reference/key-concepts.html) — `docroot`, `dist/`, “bundle vs build”, and more
|
|
18
|
+
- [Design Catalog](content/reference/design-catalog.html) — shapes and deterministic infographic figures
|
|
19
|
+
- [Slides Authoring Guidelines](content/reference/slides-authoring-guidelines.html) — practical do/don't rules for density and visual layout
|
|
20
|
+
- [Glossary](content/reference/glossary.html) — quick definitions
|