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.
- package/CHANGELOG.md +34 -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/structure.md +166 -0
- package/dist/_raw/content/reference.md +19 -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/structure.html +463 -0
- package/dist/content/reference.html +334 -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 +540 -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 +224 -0
- package/plugins-dist/slides-visuals.js +598 -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 +155 -3
- package/scripts/bundle.ts +258 -95
- package/scripts/dev.ts +203 -1
- package/src/__tests__/build.test.ts +158 -1
- package/src/__tests__/bundle.test.ts +31 -0
- package/src/__tests__/cli.test.ts +14 -3
- 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/indented-fence.md +4 -0
- package/src/__tests__/fixtures/fences/slides-visuals/invalid/stat-grid-missing-fields.md +5 -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/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/stat-grid.md +8 -0
- package/src/__tests__/init.test.ts +35 -0
- package/src/__tests__/plugin-loader.test.ts +221 -0
- package/src/__tests__/shared.test.ts +428 -0
- package/src/__tests__/slides-visuals-fence-contract.test.ts +28 -0
- package/src/__tests__/slides-visuals-runtime-regressions.bun.test.ts +114 -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 +614 -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,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Approaches"
|
|
3
|
+
description: "Three ways to use kitfly"
|
|
4
|
+
last_updated: "2026-02-03"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Three Ways to Use Kitfly
|
|
8
|
+
|
|
9
|
+
Kitfly adapts to how you work. Choose the approach that fits your situation.
|
|
10
|
+
|
|
11
|
+
## 1. Clone & Customize
|
|
12
|
+
|
|
13
|
+
**What you get:** The Kitfly engine repo (renderer, template HTML/CSS, example content).
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/3leaps/kitfly my-docs
|
|
17
|
+
cd my-docs
|
|
18
|
+
bun install
|
|
19
|
+
bun run dev
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Directory structure:**
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
my-docs/
|
|
26
|
+
├── content/ # Replace this with your docs
|
|
27
|
+
│ ├── index.md
|
|
28
|
+
│ └── guide/
|
|
29
|
+
├── src/ # Rendering code (keep this)
|
|
30
|
+
├── scripts/ # Build scripts (keep this)
|
|
31
|
+
├── site.yaml # Edit to customize
|
|
32
|
+
├── package.json # Dependencies
|
|
33
|
+
└── ... # Other template files
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**When to use:**
|
|
37
|
+
|
|
38
|
+
- You want to understand or modify how kitfly works
|
|
39
|
+
- You plan to customize the HTML template or CSS
|
|
40
|
+
- You want version control of the tooling alongside your docs
|
|
41
|
+
- You're comfortable with a bit of extra files in your repo
|
|
42
|
+
|
|
43
|
+
If you're not changing Kitfly itself, prefer `kitfly init` or pointing Kitfly at a folder.
|
|
44
|
+
|
|
45
|
+
**Trade-offs:**
|
|
46
|
+
|
|
47
|
+
- More files to manage
|
|
48
|
+
- Your docs repo includes rendering code
|
|
49
|
+
- Updates require manual merging from upstream
|
|
50
|
+
|
|
51
|
+
## 2. CLI Init
|
|
52
|
+
|
|
53
|
+
**What you get:** A clean workspace with minimal structure.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Create new site root
|
|
57
|
+
kitfly init my-handbook
|
|
58
|
+
cd my-handbook
|
|
59
|
+
kitfly dev
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Directory structure:**
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
my-handbook/
|
|
66
|
+
├── content/
|
|
67
|
+
│ ├── index.md
|
|
68
|
+
│ └── guide/
|
|
69
|
+
│ └── getting-started.md
|
|
70
|
+
├── site.yaml
|
|
71
|
+
└── .gitignore
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**When to use:**
|
|
75
|
+
|
|
76
|
+
- You want a clean start without template clutter
|
|
77
|
+
- You prefer your docs separate from tooling
|
|
78
|
+
- You're starting a new documentation project
|
|
79
|
+
- You want the simplest possible structure
|
|
80
|
+
|
|
81
|
+
**Trade-offs:**
|
|
82
|
+
|
|
83
|
+
- Requires kitfly installed (binary or via a JS runtime)
|
|
84
|
+
- Can't customize the rendering without ejecting
|
|
85
|
+
- Depends on kitfly CLI being available
|
|
86
|
+
|
|
87
|
+
## 3. Point at Folder
|
|
88
|
+
|
|
89
|
+
**What you get:** Instant rendering of any markdown folder.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Preview existing docs
|
|
93
|
+
kitfly dev ./docs
|
|
94
|
+
|
|
95
|
+
# Build to static HTML
|
|
96
|
+
kitfly build ./docs --out ./dist
|
|
97
|
+
|
|
98
|
+
# Custom port
|
|
99
|
+
kitfly dev ./docs --port 4000
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Directory structure:** Whatever you already have.
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
my-project/
|
|
106
|
+
├── docs/ # kitfly renders this
|
|
107
|
+
│ ├── README.md
|
|
108
|
+
│ ├── api/
|
|
109
|
+
│ └── guides/
|
|
110
|
+
├── src/ # Your project code (ignored)
|
|
111
|
+
└── ...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**When to use:**
|
|
115
|
+
|
|
116
|
+
- You have existing markdown you want to render
|
|
117
|
+
- You want to preview docs in another repo
|
|
118
|
+
- You're experimenting before committing to a structure
|
|
119
|
+
- You need a quick way to share markdown as HTML
|
|
120
|
+
|
|
121
|
+
**Trade-offs:**
|
|
122
|
+
|
|
123
|
+
- No `site.yaml` means less control (auto-discovery only)
|
|
124
|
+
- Need to create `site.yaml` in the folder for customization
|
|
125
|
+
- Requires kitfly installed
|
|
126
|
+
|
|
127
|
+
## Comparison Table
|
|
128
|
+
|
|
129
|
+
| Factor | Clone & Customize | CLI Init | Point at Folder |
|
|
130
|
+
| ---------------- | ----------------- | ------------ | --------------- |
|
|
131
|
+
| Setup time | ~1 min | ~30 sec | Instant |
|
|
132
|
+
| Files in repo | Many | Few | None added |
|
|
133
|
+
| Customization | Full | Config only | Config only |
|
|
134
|
+
| Requires install | Bun | Kitfly CLI | Kitfly CLI |
|
|
135
|
+
| Updates | Manual merge | CLI upgrade | CLI upgrade |
|
|
136
|
+
| Best for | Power users | New projects | Existing docs |
|
|
137
|
+
|
|
138
|
+
## Migrating Between Approaches
|
|
139
|
+
|
|
140
|
+
### From Clone to Point-at-Folder
|
|
141
|
+
|
|
142
|
+
If you started with the template but want to separate your docs:
|
|
143
|
+
|
|
144
|
+
1. Copy your `content/` folder to a new location
|
|
145
|
+
2. Copy `site.yaml` alongside it
|
|
146
|
+
3. Run `kitfly dev ./new-location`
|
|
147
|
+
|
|
148
|
+
### From Point-at-Folder to A Dedicated Site Root
|
|
149
|
+
|
|
150
|
+
If you want a clean top-level folder for publishing:
|
|
151
|
+
|
|
152
|
+
1. Run `kitfly init my-new-site`
|
|
153
|
+
2. Copy your docs into `my-new-site/content/`
|
|
154
|
+
3. Run `kitfly dev my-new-site`
|
|
155
|
+
|
|
156
|
+
### From Point-at-Folder to Init
|
|
157
|
+
|
|
158
|
+
If you want more structure:
|
|
159
|
+
|
|
160
|
+
1. Run `kitfly init my-new-docs`
|
|
161
|
+
2. Copy your markdown into `content/`
|
|
162
|
+
3. Configure `site.yaml`
|
|
163
|
+
|
|
164
|
+
### From Init to Clone
|
|
165
|
+
|
|
166
|
+
If you need to customize the rendering:
|
|
167
|
+
|
|
168
|
+
1. Clone the full template
|
|
169
|
+
2. Copy your `content/` folder over
|
|
170
|
+
3. Preserve your `site.yaml` customizations
|
|
171
|
+
|
|
172
|
+
## The docroot Concept
|
|
173
|
+
|
|
174
|
+
Regardless of approach, the `docroot` setting (in `site.yaml`) controls what gets rendered:
|
|
175
|
+
|
|
176
|
+
```yaml
|
|
177
|
+
docroot: "content" # Only content/ goes in dist/
|
|
178
|
+
docroot: "docs" # Only docs/ goes in dist/
|
|
179
|
+
docroot: "." # Everything in current dir goes in dist/
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
This is how kitfly separates your documentation from other files in your repo. The machinery (`src/`, `scripts/`, `README.md`, etc.) never appears in your built site unless you explicitly configure it.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Features"
|
|
3
|
+
description: "What kitfly can do"
|
|
4
|
+
last_updated: "2026-02-03"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Features
|
|
8
|
+
|
|
9
|
+
Everything kitfly supports, demonstrated on this page.
|
|
10
|
+
|
|
11
|
+
## Code Highlighting
|
|
12
|
+
|
|
13
|
+
Syntax highlighting via Prism.js (loaded from CDN):
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
function greet(name) {
|
|
17
|
+
return `Hello, ${name}!`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
console.log(greet("World"));
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
def greet(name: str) -> str:
|
|
25
|
+
return f"Hello, {name}!"
|
|
26
|
+
|
|
27
|
+
print(greet("World"))
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
site:
|
|
32
|
+
title: "My Documentation"
|
|
33
|
+
theme: "auto"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Mermaid Diagrams
|
|
37
|
+
|
|
38
|
+
Flowcharts, sequence diagrams, and more:
|
|
39
|
+
|
|
40
|
+
```mermaid
|
|
41
|
+
graph LR
|
|
42
|
+
A[Markdown] --> B[Kitfly]
|
|
43
|
+
B --> C[HTML]
|
|
44
|
+
C --> D[Browser]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```mermaid
|
|
48
|
+
sequenceDiagram
|
|
49
|
+
User->>Kitfly: bun run build
|
|
50
|
+
Kitfly->>Markdown: Parse files
|
|
51
|
+
Markdown-->>Kitfly: Content
|
|
52
|
+
Kitfly->>HTML: Generate pages
|
|
53
|
+
HTML-->>User: Static site
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Tables
|
|
57
|
+
|
|
58
|
+
Standard markdown tables with clean styling:
|
|
59
|
+
|
|
60
|
+
| Feature | Status | Notes |
|
|
61
|
+
| ---------- | ------ | ----------------- |
|
|
62
|
+
| Hot reload | ✅ | Instant updates |
|
|
63
|
+
| Dark mode | ✅ | System preference |
|
|
64
|
+
| TOC | ✅ | Auto-generated |
|
|
65
|
+
| Search | 🚧 | Coming soon |
|
|
66
|
+
|
|
67
|
+
## Text Formatting
|
|
68
|
+
|
|
69
|
+
Standard markdown formatting:
|
|
70
|
+
|
|
71
|
+
- **Bold text** for emphasis
|
|
72
|
+
- _Italic text_ for nuance
|
|
73
|
+
- `inline code` for technical terms
|
|
74
|
+
- ~~Strikethrough~~ for corrections
|
|
75
|
+
|
|
76
|
+
> Blockquotes for callouts and important notes.
|
|
77
|
+
> They can span multiple lines.
|
|
78
|
+
|
|
79
|
+
## Links
|
|
80
|
+
|
|
81
|
+
- [Internal link to Getting Started](getting-started.html)
|
|
82
|
+
- [External link to Bun](https://bun.sh)
|
|
83
|
+
- [Reference to Configuration](../reference/configuration.html)
|
|
84
|
+
|
|
85
|
+
## Lists
|
|
86
|
+
|
|
87
|
+
Ordered:
|
|
88
|
+
|
|
89
|
+
1. First item
|
|
90
|
+
2. Second item
|
|
91
|
+
3. Third item
|
|
92
|
+
|
|
93
|
+
Unordered:
|
|
94
|
+
|
|
95
|
+
- Item one
|
|
96
|
+
- Item two
|
|
97
|
+
- Nested item
|
|
98
|
+
- Another nested
|
|
99
|
+
- Item three
|
|
100
|
+
|
|
101
|
+
## Images
|
|
102
|
+
|
|
103
|
+
Standard markdown images are supported across all output modes:
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+

|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
In `kitfly dev` and `kitfly build`, images are served from their original paths. In `kitfly bundle`, images are automatically inlined as base64 data URIs so the single-file HTML works fully offline with no broken references.
|
|
110
|
+
|
|
111
|
+
## Headings
|
|
112
|
+
|
|
113
|
+
This page demonstrates h1 through h3. The table of contents on the right is auto-generated from h2 and h3 headings.
|
|
114
|
+
|
|
115
|
+
### This is an h3
|
|
116
|
+
|
|
117
|
+
Use h3 for subsections within a topic.
|
|
118
|
+
|
|
119
|
+
### Another h3
|
|
120
|
+
|
|
121
|
+
The TOC captures these too.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Getting Started"
|
|
3
|
+
description: "Set up your first kitfly site"
|
|
4
|
+
last_updated: "2026-02-03"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Getting Started
|
|
8
|
+
|
|
9
|
+
Get your documentation site running in under a minute.
|
|
10
|
+
|
|
11
|
+
## The Site Root Concept
|
|
12
|
+
|
|
13
|
+
Kitfly always operates on a folder you point it at (the **site root**).
|
|
14
|
+
|
|
15
|
+
That folder typically contains:
|
|
16
|
+
|
|
17
|
+
- `content/` (or `docs/` or any folder you choose)
|
|
18
|
+
- `site.yaml` (recommended) for nav + branding
|
|
19
|
+
- `theme.yaml` (optional) for colors + typography
|
|
20
|
+
|
|
21
|
+
## Create A New Site Root (Recommended)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
kitfly init my-docs
|
|
25
|
+
cd my-docs
|
|
26
|
+
kitfly dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Your browser opens to `http://localhost:3333` with hot reload.
|
|
30
|
+
|
|
31
|
+
## Add Your Content
|
|
32
|
+
|
|
33
|
+
1. **Delete the sample content:**
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
rm -rf content/*
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. **Add your markdown files:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
cp -r ~/my-docs/* content/
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
3. **Organize into sections:**
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
content/
|
|
49
|
+
├── index.md # Home page
|
|
50
|
+
├── guide/ # Becomes "Guide" section
|
|
51
|
+
│ ├── quickstart.md
|
|
52
|
+
│ └── tutorial.md
|
|
53
|
+
└── reference/ # Becomes "Reference" section
|
|
54
|
+
└── api.md
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
4. **Preview:**
|
|
58
|
+
```bash
|
|
59
|
+
bun run dev
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Subdirectories automatically become navigation sections. Files within them appear in the sidebar.
|
|
63
|
+
|
|
64
|
+
## Share It
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
kitfly build --out dist
|
|
68
|
+
|
|
69
|
+
# Single-file bundle (easiest to email/Slack)
|
|
70
|
+
kitfly bundle --out dist --name my-docs.html
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Output goes to `dist/`. You can:
|
|
74
|
+
|
|
75
|
+
- **Open directly:** `open dist/index.html`
|
|
76
|
+
- **Deploy anywhere:** GitHub Pages, Netlify, S3, any static host
|
|
77
|
+
- **Share as zip:** Compress and email for review
|
|
78
|
+
|
|
79
|
+
The static HTML works offline - no server required.
|
|
80
|
+
|
|
81
|
+
## Frontmatter
|
|
82
|
+
|
|
83
|
+
Add metadata to your markdown files:
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
---
|
|
87
|
+
title: "Page Title"
|
|
88
|
+
description: "Brief description"
|
|
89
|
+
last_updated: "2026-02-03"
|
|
90
|
+
---
|
|
91
|
+
# Your Content Here
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- `title` - Appears in browser tab and header
|
|
95
|
+
- `description` - For meta tags
|
|
96
|
+
- `last_updated` - Shown in page footer
|
|
97
|
+
|
|
98
|
+
## Next Steps
|
|
99
|
+
|
|
100
|
+
- [Approaches](approaches.html) - Understand the three ways to use kitfly
|
|
101
|
+
- [Kitfly Overview](kitfly-overview.html) - The big picture and workflows
|
|
102
|
+
- [Features](features.html) - See code highlighting, diagrams, and more
|
|
103
|
+
- [Configuration](../reference/configuration.html) - Customize `site.yaml`
|
|
104
|
+
|
|
105
|
+
## Running From Source
|
|
106
|
+
|
|
107
|
+
If you're working on the Kitfly engine itself (this repo), you can run the CLI via Bun:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
bun install
|
|
111
|
+
bun run src/cli.ts dev .
|
|
112
|
+
```
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Kitfly Overview"
|
|
3
|
+
description: "What Kitfly is, how it works, and the philosophy behind it"
|
|
4
|
+
last_updated: "2026-02-04"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Kitfly Overview
|
|
8
|
+
|
|
9
|
+
Kitfly helps people who aren't web developers turn a folder of writing into something shareable:
|
|
10
|
+
|
|
11
|
+
- A **single-file HTML bundle** you can email or post in Slack
|
|
12
|
+
- A **static site folder** you can zip and host anywhere
|
|
13
|
+
|
|
14
|
+
It is intentionally small: one dependency (`marked`) and a codebase you can understand in an afternoon.
|
|
15
|
+
|
|
16
|
+
## Mission
|
|
17
|
+
|
|
18
|
+
Many people have documentation that needs to be shared: runbooks, handbooks, project docs, technical guides. The options are often:
|
|
19
|
+
|
|
20
|
+
- **Too heavy**: Docusaurus, Hugo, Astro require learning build tooling
|
|
21
|
+
- **Too locked**: Notion, Confluence, GitBook require accounts and subscriptions
|
|
22
|
+
- **Too ugly**: Raw markdown or PDFs don't look professional
|
|
23
|
+
|
|
24
|
+
Kitfly sits in the gap: professional output, minimal complexity, no lock-in.
|
|
25
|
+
|
|
26
|
+
## What Kitfly Is
|
|
27
|
+
|
|
28
|
+
- A renderer for markdown folders with a clean, professional default layout
|
|
29
|
+
- A fast way to preview docs locally (`kitfly dev`)
|
|
30
|
+
- A way to ship docs as artifacts (`kitfly bundle`, `kitfly build`)
|
|
31
|
+
- A tool that gives you **your own copy** of the rendering code
|
|
32
|
+
|
|
33
|
+
## What Kitfly Is Not
|
|
34
|
+
|
|
35
|
+
Kitfly is not trying to replace full static site generators or app frameworks. These are excellent — use them when you need their power:
|
|
36
|
+
|
|
37
|
+
| Tool | Strength | Use When |
|
|
38
|
+
| ------------------- | ------------------------------- | ----------------------- |
|
|
39
|
+
| **Obsidian** | Personal knowledge, journaling | You need a second brain |
|
|
40
|
+
| **Docusaurus** | React ecosystem, versioned docs | You have a dev team |
|
|
41
|
+
| **Hugo** | Speed, themes, flexibility | You want a powerful SSG |
|
|
42
|
+
| **Astro/Starlight** | Modern, component-driven | You need interactivity |
|
|
43
|
+
| **VitePress** | Vue ecosystem, great DX | You're in the Vue world |
|
|
44
|
+
|
|
45
|
+
Use Kitfly when you don't need those. Your content is just markdown — migration is straightforward when you outgrow it.
|
|
46
|
+
|
|
47
|
+
## Three Ways to Use Kitfly
|
|
48
|
+
|
|
49
|
+
### 1. Create a Standalone Site (Primary Path)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
kitfly init my-docs
|
|
53
|
+
cd my-docs
|
|
54
|
+
bun install
|
|
55
|
+
bun run dev
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This creates a **complete, self-contained site** with:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
my-docs/
|
|
62
|
+
├── .kitfly/ # Provenance metadata
|
|
63
|
+
│ └── manifest.json
|
|
64
|
+
├── content/ # Your docs go here
|
|
65
|
+
├── scripts/ # Rendering code (yours now)
|
|
66
|
+
│ ├── dev.ts
|
|
67
|
+
│ ├── build.ts
|
|
68
|
+
│ └── bundle.ts
|
|
69
|
+
├── src/
|
|
70
|
+
│ ├── engine.ts
|
|
71
|
+
│ ├── theme.ts
|
|
72
|
+
│ └── site/
|
|
73
|
+
│ ├── template.html
|
|
74
|
+
│ └── styles.css
|
|
75
|
+
├── schemas/
|
|
76
|
+
├── site.yaml
|
|
77
|
+
├── package.json # { "dependencies": { "marked": "^15" } }
|
|
78
|
+
└── VERSION # Provenance: created from kitfly 0.1.0
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**The site is detached from kitfly.** You own the code. You can:
|
|
82
|
+
|
|
83
|
+
- Modify the template, styles, rendering logic
|
|
84
|
+
- Version control the whole thing (`git init`)
|
|
85
|
+
- Never touch kitfly CLI again if you don't want to
|
|
86
|
+
|
|
87
|
+
**Best for:** New documentation projects, teams who want ownership.
|
|
88
|
+
|
|
89
|
+
### 2. Point at Existing Docs (Quick Preview)
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
kitfly dev ./my-existing-docs
|
|
93
|
+
kitfly build ./my-existing-docs --out ./dist
|
|
94
|
+
kitfly bundle ./my-existing-docs --name docs.html
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Renders any folder of markdown without copying anything into it.
|
|
98
|
+
|
|
99
|
+
**Best for:** Previewing docs that live in another repo, quick experiments.
|
|
100
|
+
|
|
101
|
+
### 3. Clone the Kitfly Repo (Contributors)
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
git clone https://github.com/3leaps/kitfly
|
|
105
|
+
cd kitfly
|
|
106
|
+
bun install
|
|
107
|
+
bun run dev
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This is the kitfly engine repo. The `content/` folder **is** the kitfly documentation — you're reading it now.
|
|
111
|
+
|
|
112
|
+
**Best for:** Contributing to kitfly, modifying the CLI, deep customization.
|
|
113
|
+
|
|
114
|
+
## The "Fly" — How Docs Travel
|
|
115
|
+
|
|
116
|
+
Kitfly makes docs "fly" by producing artifacts that travel well:
|
|
117
|
+
|
|
118
|
+
| Command | Output | Use Case |
|
|
119
|
+
| --------------- | ---------------- | -------------------------- |
|
|
120
|
+
| `kitfly dev` | Live preview | Writing and editing |
|
|
121
|
+
| `kitfly build` | `dist/` folder | Deploy to any static host |
|
|
122
|
+
| `kitfly bundle` | Single HTML file | Email, Slack, shared drive |
|
|
123
|
+
|
|
124
|
+
The bundle is typically 1-2MB and works offline — open it in any browser.
|
|
125
|
+
|
|
126
|
+
## Philosophy: Minimalist Site Code
|
|
127
|
+
|
|
128
|
+
The code that `kitfly init` copies to your project follows strict constraints:
|
|
129
|
+
|
|
130
|
+
| Metric | Target | Rationale |
|
|
131
|
+
| ------------ | ------ | ------------------------------ |
|
|
132
|
+
| Total lines | ~500 | Understandable in an afternoon |
|
|
133
|
+
| Dependencies | 1 | No supply chain risk |
|
|
134
|
+
| Files | ~10 | Nothing hidden |
|
|
135
|
+
|
|
136
|
+
> **Rule of thumb**: If it can be done with CSS, vanilla JS under 50 lines, or a marked plugin, it belongs. Otherwise, it doesn't.
|
|
137
|
+
|
|
138
|
+
This is codified in [ADR-0001: Minimalist Site Code](../../docs/decisions/ADR-0001-minimalist-site-code.md).
|
|
139
|
+
|
|
140
|
+
Users can modify the code — that's expected. But the starting point should be small enough that modification feels safe, not scary.
|
|
141
|
+
|
|
142
|
+
## Provenance and Updates
|
|
143
|
+
|
|
144
|
+
When you run `kitfly init`, the site is stamped with provenance:
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
// .kitfly/manifest.json
|
|
148
|
+
{
|
|
149
|
+
"version": "0.1.0",
|
|
150
|
+
"createdAt": "2026-02-04T12:00:00Z",
|
|
151
|
+
"files": {
|
|
152
|
+
"scripts/dev.ts": { "hash": "a1b2c3", "managed": true },
|
|
153
|
+
...
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
This enables future updates:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
kitfly update # Upgrade to latest
|
|
162
|
+
kitfly update 0.2.0 # Upgrade to specific version
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The update logic:
|
|
166
|
+
|
|
167
|
+
1. Read manifest → know current version
|
|
168
|
+
2. For each managed file: check if user modified it (hash comparison)
|
|
169
|
+
3. Safe to replace → update file
|
|
170
|
+
4. User modified → warn, offer merge/skip/force
|
|
171
|
+
5. Update manifest with new version
|
|
172
|
+
|
|
173
|
+
## This Repo Is the Kitfly Docs
|
|
174
|
+
|
|
175
|
+
The `content/` folder in this repository is the actual kitfly documentation. When you run `kitfly dev .` here, you're seeing our docs rendered by our tool.
|
|
176
|
+
|
|
177
|
+
This means:
|
|
178
|
+
|
|
179
|
+
- **No fake showcase pages** — everything you see is real
|
|
180
|
+
- **Features are demonstrated by use** — Mermaid diagrams, code fences, theming
|
|
181
|
+
- **The docs are always current** — we eat our own cooking
|
|
182
|
+
|
|
183
|
+
## Architecture Summary
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
kitfly/ # The tool
|
|
187
|
+
├── src/cli.ts # CLI entry (not copied to users)
|
|
188
|
+
├── src/commands/ # init, update (not copied)
|
|
189
|
+
├── content/ # Kitfly's own docs (not copied)
|
|
190
|
+
│
|
|
191
|
+
├── scripts/ # ← Copied to user sites
|
|
192
|
+
│ ├── dev.ts
|
|
193
|
+
│ ├── build.ts
|
|
194
|
+
│ └── bundle.ts
|
|
195
|
+
├── src/site/ # ← Copied to user sites
|
|
196
|
+
│ ├── template.html
|
|
197
|
+
│ └── styles.css
|
|
198
|
+
├── src/engine.ts # ← Copied
|
|
199
|
+
├── src/theme.ts # ← Copied
|
|
200
|
+
└── schemas/ # ← Copied
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**Kitfly the tool** can grow thoughtfully (more CLI commands, smarter updates). **Site code** stays minimal.
|
|
204
|
+
|
|
205
|
+
## Next Steps
|
|
206
|
+
|
|
207
|
+
- [Getting Started](getting-started.md) — Set up your first site
|
|
208
|
+
- [Features](features.md) — See code highlighting, Mermaid diagrams, theming
|
|
209
|
+
- [Configuration](../reference/configuration.md) — Customize `site.yaml` and `theme.yaml`
|