blume 0.7.0 → 1.0.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 +666 -0
- package/LICENSE +21 -0
- package/README.md +107 -0
- package/dist/cli/index.js +1852 -380
- package/dist/cli/index.js.map +98 -91
- package/dist/types/ai/component-markdown.d.ts +34 -0
- package/dist/types/components/content/youtube.d.ts +18 -0
- package/dist/types/core/base-path.d.ts +9 -0
- package/dist/types/core/config-input.d.ts +47 -2
- package/dist/types/core/config.d.ts +3 -2
- package/dist/types/core/data.d.ts +7 -0
- package/dist/types/core/i18n-ui.d.ts +526 -132
- package/dist/types/core/schema.d.ts +293 -146
- package/dist/types/index.d.ts +1 -0
- package/dist/types/openapi/references.d.ts +60 -0
- package/dist/types/seo/x-handle.d.ts +12 -0
- package/docs/01-quickstart.mdx +5 -2
- package/docs/02-deployment.mdx +8 -8
- package/docs/03-faq.mdx +46 -16
- package/docs/advanced/api-reference.mdx +1 -1
- package/docs/advanced/changelog.mdx +1 -1
- package/docs/advanced/custom-pages.mdx +1 -1
- package/docs/advanced/skills.mdx +1 -1
- package/docs/configuration/ai.mdx +49 -10
- package/docs/configuration/customization.mdx +11 -0
- package/docs/configuration/export.mdx +1 -1
- package/docs/configuration/index.mdx +27 -3
- package/docs/configuration/seo.mdx +35 -5
- package/docs/content/components.mdx +2 -2
- package/docs/content/i18n.mdx +1 -1
- package/docs/content/navigation.mdx +3 -3
- package/docs/content/sources.mdx +1 -1
- package/docs/content/syntax.mdx +6 -4
- package/docs/index.mdx +2 -2
- package/docs/reference/cli.mdx +9 -7
- package/docs/reference/frontmatter.mdx +1 -1
- package/package.json +22 -4
- package/skills/blume/SKILL.md +5 -3
- package/skills/blume-update-docs/SKILL.md +3 -2
- package/src/ai/agent-readability.ts +9 -8
- package/src/ai/ask-context.ts +7 -2
- package/src/ai/ask-data.ts +3 -0
- package/src/ai/component-markdown.ts +461 -0
- package/src/ai/llms.ts +135 -26
- package/src/ai/markdown.ts +35 -6
- package/src/ai/mcp/data.ts +25 -4
- package/src/ai/mcp/discovery.ts +10 -3
- package/src/ai/mcp/server.ts +21 -7
- package/src/ai/mcp/tools.ts +1 -1
- package/src/ai/visibility.ts +74 -0
- package/src/astro/component-slots.ts +11 -1
- package/src/astro/generate.ts +77 -45
- package/src/astro/integration.ts +1 -1
- package/src/astro/markdown-negotiation.ts +1 -1
- package/src/astro/pages.ts +81 -19
- package/src/astro/templates.ts +150 -19
- package/src/blume-modules.d.ts +8 -0
- package/src/cli/commands/build.ts +120 -23
- package/src/cli/commands/check.ts +1 -1
- package/src/cli/commands/dev.ts +26 -5
- package/src/cli/commands/eject.ts +47 -19
- package/src/cli/commands/init.ts +120 -180
- package/src/cli/commands/preview.ts +4 -1
- package/src/cli/commands/validate.ts +43 -2
- package/src/cli/dev-lock.ts +8 -4
- package/src/cli/eject-scripts.ts +72 -0
- package/src/cli/env.ts +15 -5
- package/src/cli/init/questions.ts +158 -0
- package/src/cli/init/scaffold.ts +380 -0
- package/src/cli/internal-error.ts +9 -4
- package/src/cli/prepare.ts +3 -2
- package/src/components/Icon.astro +2 -1
- package/src/components/content/AccordionItem.astro +23 -4
- package/src/components/content/Badge.astro +3 -1
- package/src/components/content/Card.astro +4 -2
- package/src/components/content/Step.astro +10 -1
- package/src/components/content/Tabs.astro +15 -3
- package/src/components/content/Tile.astro +2 -1
- package/src/components/content/Tooltip.astro +3 -1
- package/src/components/content/Update.astro +9 -2
- package/src/components/content/auto-type-table.ts +7 -1
- package/src/components/content/base-href.ts +33 -0
- package/src/components/content/changelog-element.ts +9 -2
- package/src/components/content/mermaid-element.ts +7 -2
- package/src/components/islands/AskAI.astro +5 -2
- package/src/components/islands/ask-ai.tsx +86 -11
- package/src/components/islands/hooks.ts +28 -8
- package/src/components/layout/Banner.astro +10 -2
- package/src/components/layout/Breadcrumbs.astro +11 -2
- package/src/components/layout/Header.astro +13 -4
- package/src/components/layout/Logo.astro +11 -3
- package/src/components/layout/NavTree.astro +19 -5
- package/src/components/layout/PageActions.astro +25 -10
- package/src/components/layout/PageLayout.astro +85 -9
- package/src/components/layout/Pagination.astro +10 -4
- package/src/components/layout/ReferenceLayout.astro +20 -2
- package/src/components/layout/RootLayout.astro +142 -12
- package/src/components/layout/Search.astro +117 -27
- package/src/components/layout/search/algolia.ts +11 -2
- package/src/components/layout/search/endpoint.ts +11 -5
- package/src/components/layout/search/orama-cloud.ts +8 -2
- package/src/components/layout/search/types.ts +5 -1
- package/src/components/layout/search/typesense.ts +4 -1
- package/src/components/layout/toc-element.ts +1 -1
- package/src/components/openapi/ApiTagOperations.astro +2 -1
- package/src/components/openapi/Operation.astro +47 -40
- package/src/components/openapi/RequestPanel.astro +1 -1
- package/src/components/openapi/helpers.ts +71 -3
- package/src/components/openapi/panel.ts +1 -1
- package/src/core/base-path.ts +24 -0
- package/src/core/builtin-tags.ts +2 -0
- package/src/core/config-input.ts +48 -2
- package/src/core/config.ts +3 -2
- package/src/core/data.ts +4 -0
- package/src/core/frontmatter.ts +7 -0
- package/src/core/graph.ts +15 -5
- package/src/core/i18n-ui.ts +54 -0
- package/src/core/i18n.ts +16 -8
- package/src/core/last-modified.ts +13 -6
- package/src/core/links.ts +32 -8
- package/src/core/navigation.ts +29 -4
- package/src/core/package-json.ts +17 -2
- package/src/core/project-graph.ts +15 -6
- package/src/core/schema.ts +71 -2
- package/src/core/sources/assets.ts +6 -1
- package/src/core/sources/filesystem.ts +4 -0
- package/src/core/sources/mdx-remote.ts +23 -14
- package/src/core/sources/normalize.ts +152 -50
- package/src/core/sources/notion.ts +8 -8
- package/src/core/ui-packs/ar.ts +8 -0
- package/src/core/ui-packs/bg.ts +8 -0
- package/src/core/ui-packs/bn.ts +8 -0
- package/src/core/ui-packs/ca.ts +8 -0
- package/src/core/ui-packs/cs.ts +8 -0
- package/src/core/ui-packs/da.ts +8 -0
- package/src/core/ui-packs/de.ts +8 -0
- package/src/core/ui-packs/el.ts +8 -0
- package/src/core/ui-packs/es.ts +8 -0
- package/src/core/ui-packs/fa.ts +8 -0
- package/src/core/ui-packs/fi.ts +8 -0
- package/src/core/ui-packs/fr.ts +9 -1
- package/src/core/ui-packs/he.ts +8 -0
- package/src/core/ui-packs/hi.ts +8 -0
- package/src/core/ui-packs/hr.ts +8 -0
- package/src/core/ui-packs/hu.ts +8 -0
- package/src/core/ui-packs/id.ts +8 -0
- package/src/core/ui-packs/it.ts +8 -0
- package/src/core/ui-packs/ja.ts +8 -0
- package/src/core/ui-packs/ko.ts +8 -0
- package/src/core/ui-packs/nl.ts +8 -0
- package/src/core/ui-packs/no.ts +8 -0
- package/src/core/ui-packs/pl.ts +8 -0
- package/src/core/ui-packs/pt-br.ts +8 -0
- package/src/core/ui-packs/pt.ts +8 -0
- package/src/core/ui-packs/ro.ts +8 -0
- package/src/core/ui-packs/ru.ts +8 -0
- package/src/core/ui-packs/sk.ts +8 -0
- package/src/core/ui-packs/sr.ts +8 -0
- package/src/core/ui-packs/sv.ts +8 -0
- package/src/core/ui-packs/th.ts +8 -0
- package/src/core/ui-packs/tr.ts +8 -0
- package/src/core/ui-packs/uk.ts +8 -0
- package/src/core/ui-packs/vi.ts +8 -0
- package/src/core/ui-packs/zh-tw.ts +8 -0
- package/src/core/ui-packs/zh.ts +8 -0
- package/src/deploy/adapter-output.ts +18 -8
- package/src/deploy/redirects.ts +7 -2
- package/src/deploy/sitemap.ts +53 -11
- package/src/index.ts +5 -0
- package/src/markdown/base-links.ts +10 -8
- package/src/markdown/index.ts +15 -3
- package/src/markdown/inline-code.ts +7 -2
- package/src/markdown/package-commands.ts +10 -4
- package/src/og/card.ts +4 -2
- package/src/og/dimensions.ts +12 -0
- package/src/openapi/model.ts +12 -4
- package/src/openapi/parse.ts +21 -0
- package/src/openapi/references.ts +38 -8
- package/src/openapi/render-mdx.ts +62 -1
- package/src/openapi/source.ts +59 -10
- package/src/registry/eject.ts +184 -12
- package/src/registry/registry.ts +0 -3
- package/src/search/documents.ts +34 -2
- package/src/seo/jsonld.ts +20 -13
- package/src/seo/x-handle.ts +18 -0
package/docs/content/syntax.mdx
CHANGED
|
@@ -261,7 +261,7 @@ Hide the language icons or wrap long lines instead of scrolling with `markdown:
|
|
|
261
261
|
|
|
262
262
|
## Package install
|
|
263
263
|
|
|
264
|
-
A `package-install` block turns a single install command into a tabbed snippet for npm, pnpm, yarn, and bun — so readers copy the one that matches their setup.
|
|
264
|
+
A `package-install` block turns a single install command into a tabbed snippet for npm, pnpm, yarn, and bun — so readers copy the one that matches their setup. Like diagrams and math, this is an MDX-only feature — in a `.md` file the block renders as a plain code fence.
|
|
265
265
|
|
|
266
266
|
```package-install
|
|
267
267
|
npm i blume
|
|
@@ -297,7 +297,7 @@ Diagrams render on the client, so this is an MDX-only feature, and the Mermaid l
|
|
|
297
297
|
|
|
298
298
|
## Callouts
|
|
299
299
|
|
|
300
|
-
Callouts pull a reader's attention to context, advice, or risk. Write them as `:::type` directives; add a title in brackets, like `:::warning[Heads up]`.
|
|
300
|
+
Callouts pull a reader's attention to context, advice, or risk. Write them as `:::type` directives; add a title in brackets, like `:::warning[Heads up]`. Directives are an MDX-only feature — in a `.md` file a `:::note` line stays literal text.
|
|
301
301
|
|
|
302
302
|
### Note
|
|
303
303
|
|
|
@@ -345,11 +345,13 @@ Your docs built successfully and are ready to deploy.
|
|
|
345
345
|
|
|
346
346
|
Flag something that needs care to avoid a mistake or surprising behavior.
|
|
347
347
|
|
|
348
|
-
:::warning[Heads up]
|
|
348
|
+
:::warning[Heads up]
|
|
349
|
+
Switching to `output: "server"` requires an adapter before you can deploy.
|
|
349
350
|
:::
|
|
350
351
|
|
|
351
352
|
```md
|
|
352
|
-
:::warning[Heads up]
|
|
353
|
+
:::warning[Heads up]
|
|
354
|
+
Switching to `output: "server"` requires an adapter before you can deploy.
|
|
353
355
|
:::
|
|
354
356
|
```
|
|
355
357
|
|
package/docs/index.mdx
CHANGED
|
@@ -19,9 +19,9 @@ Drop Markdown or MDX into a folder, run `blume dev`, and get a production-grade
|
|
|
19
19
|
|
|
20
20
|
## Why Blume exists
|
|
21
21
|
|
|
22
|
-
Docs should be fast, AI-ready and
|
|
22
|
+
Docs should be fast, AI-ready, and zero-config — down to not needing a starter template at all. Some docs tools hand you an entire codebase to maintain before you've written a word. Others build the template around your content, but lock you in to their managed service.
|
|
23
23
|
|
|
24
|
-
Blume takes the best of both worlds. The framework is the template, so the only thing you ever touch is your content. When you want to customize, you can start replacing the built-in components, modifying the single configuration file or even ejecting if you want the Astro site directly.
|
|
24
|
+
Blume takes the best of both worlds. The framework is the template, so the only thing you ever touch is your content. When you want to customize, you can start by replacing the built-in components, modifying the single configuration file, or even ejecting if you want the Astro site directly. The [FAQ](/docs/faq) walks through how that compares to Mintlify, Fumadocs, and the rest.
|
|
25
25
|
|
|
26
26
|
## What makes Blume different
|
|
27
27
|
|
package/docs/reference/cli.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: CLI
|
|
3
|
-
description:
|
|
3
|
+
description: Every Blume command and flag — init, dev, build, preview, add, sync, and eject.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
```bash
|
|
@@ -11,7 +11,7 @@ blume <command> [options]
|
|
|
11
11
|
|
|
12
12
|
| Command | Description |
|
|
13
13
|
| ------------------ | ------------------------------------------------ |
|
|
14
|
-
| `blume init`
|
|
14
|
+
| `blume init [dir]` | Scaffold a project (interactive by default). |
|
|
15
15
|
| `blume dev` | Start the dev server with hot reload. |
|
|
16
16
|
| `blume build` | Build the static (or server) site. |
|
|
17
17
|
| `blume preview` | Preview the last build. |
|
|
@@ -24,7 +24,9 @@ blume <command> [options]
|
|
|
24
24
|
|
|
25
25
|
## Common flags
|
|
26
26
|
|
|
27
|
-
- `blume init
|
|
27
|
+
- `blume init` — in a terminal, walks you through a few questions (where to create the project, site name, template, content sources); each flag below pre-answers its question.
|
|
28
|
+
- `blume init --yes` — skip the prompts and scaffold with defaults (also the behavior in CI or when stdin isn't a terminal).
|
|
29
|
+
- `blume init --content-dir <dir>` — set the content folder (default `docs`).
|
|
28
30
|
- `blume init --template docs|api|sdk|changelog` — scaffold from a starter (API reference, SDK, or changelog instead of the plain docs seed).
|
|
29
31
|
- `blume init --package-manager npm|pnpm|yarn|bun` — tailor the printed next-steps to your package manager.
|
|
30
32
|
- `blume init --eject` — scaffold, then eject to a standalone Astro project (falls back to guiding you through `blume eject` when dependencies aren't installed yet).
|
|
@@ -53,9 +55,9 @@ blume <command> [options]
|
|
|
53
55
|
`blume dev` serves a live Astro server rooted at the generated `.blume/` runtime and regenerates it on every change. `blume build` and `blume check` regenerate the _same_ `.blume/`, so running either while the dev server is live would corrupt it — both refuse with an error and exit non-zero:
|
|
54
56
|
|
|
55
57
|
```
|
|
56
|
-
A `blume dev` server is running
|
|
57
|
-
|
|
58
|
-
.blume-verify without touching it.
|
|
58
|
+
A `blume dev` server is running at http://localhost:3000; building would
|
|
59
|
+
corrupt its .blume runtime. Reuse that server, stop it first, or re-run with
|
|
60
|
+
--isolated to build/verify against .blume-verify without touching it.
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
The `--isolated` flag is the escape hatch. It relocates the entire generated runtime (and, for `build`, its output `dist/`) to a sibling `.blume-verify/` directory, so the verification never writes anything the dev server — or your real `dist/` — depends on:
|
|
@@ -66,7 +68,7 @@ blume check --isolated # fast: type-check the .astro/config changes
|
|
|
66
68
|
blume build --isolated # thorough: full production render into .blume-verify/dist
|
|
67
69
|
```
|
|
68
70
|
|
|
69
|
-
`check --isolated` is the quick path (Astro type + template diagnostics, no `dist/`); `build --isolated` is the heavier one that also catches runtime render errors. Isolated builds skip the deploy post-steps (search index, hosted-provider sync, `llms.txt`, sitemap/robots, redirects) — a verify only needs to confirm the site compiles and renders, not publish it. Blume adds `.blume-verify/` to your `.gitignore` automatically.
|
|
71
|
+
`check --isolated` is the quick path (Astro type + template diagnostics, no `dist/`); `build --isolated` is the heavier one that also catches runtime render errors. Isolated builds skip the deploy post-steps (search index, hosted-provider sync, `llms.txt`, sitemap/robots, redirects) — a verify only needs to confirm the site compiles and renders, not publish it. `--analyze` and the `--budget-js`/`--budget-css` gates still run, measured against the isolated output. Blume adds `.blume-verify/` to your `.gitignore` automatically.
|
|
70
72
|
|
|
71
73
|
This is especially useful when a coding agent needs to verify changes while you keep the dev server open. To make plain `blume build`/`blume check` isolate without the flag — for example in an agent's shell — set `BLUME_RUNTIME_DIR` to the runtime directory to use:
|
|
72
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blume",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Documentation that's fast, AI-ready, and zero-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"src",
|
|
30
30
|
"bin",
|
|
31
31
|
"docs",
|
|
32
|
-
"skills"
|
|
32
|
+
"skills",
|
|
33
|
+
"CHANGELOG.md"
|
|
33
34
|
],
|
|
34
35
|
"type": "module",
|
|
35
36
|
"types": "./dist/types/index.d.ts",
|
|
@@ -71,6 +72,7 @@
|
|
|
71
72
|
"@astrojs/node": "^11.0.0",
|
|
72
73
|
"@astrojs/react": "^6.0.0",
|
|
73
74
|
"@astrojs/vercel": "^11.0.0",
|
|
75
|
+
"@clack/prompts": "^1.7.0",
|
|
74
76
|
"@iconify-json/lucide": "^1.2.115",
|
|
75
77
|
"@iconify/types": "^2.0.0",
|
|
76
78
|
"@iconify/utils": "^3.1.3",
|
|
@@ -92,7 +94,6 @@
|
|
|
92
94
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
93
95
|
"citty": "^0.1.6",
|
|
94
96
|
"consola": "^3.4.0",
|
|
95
|
-
"deepmerge": "^4.3.1",
|
|
96
97
|
"dompurify": "^3.4.11",
|
|
97
98
|
"epub-gen-memory": "^1.1.2",
|
|
98
99
|
"github-slugger": "^2.0.0",
|
|
@@ -106,11 +107,12 @@
|
|
|
106
107
|
"pathe": "^2.0.0",
|
|
107
108
|
"react": "^19.0.0",
|
|
108
109
|
"react-dom": "^19.0.0",
|
|
110
|
+
"satteri": "^0.9.5",
|
|
109
111
|
"shiki": "^4.2.0",
|
|
110
112
|
"simple-icons": "^13.0.0",
|
|
111
113
|
"tailwindcss": "^4",
|
|
112
114
|
"tinyglobby": "^0.2.10",
|
|
113
|
-
"typescript": "^
|
|
115
|
+
"typescript": "^6.0.3",
|
|
114
116
|
"undici": "^8.6.0",
|
|
115
117
|
"zod": "^3.24.0"
|
|
116
118
|
},
|
|
@@ -124,6 +126,10 @@
|
|
|
124
126
|
},
|
|
125
127
|
"peerDependencies": {
|
|
126
128
|
"@ai-sdk/openai-compatible": "^1.0.41",
|
|
129
|
+
"@astrojs/cloudflare": "^14.0.0",
|
|
130
|
+
"@astrojs/netlify": "^8.0.0",
|
|
131
|
+
"@astrojs/svelte": "^9.0.0",
|
|
132
|
+
"@astrojs/vue": "^7.0.0",
|
|
127
133
|
"@mixedbread/sdk": "^0.76.0",
|
|
128
134
|
"@notionhq/client": "^2.2.15",
|
|
129
135
|
"@openrouter/ai-sdk-provider": "^1.5.4",
|
|
@@ -137,6 +143,18 @@
|
|
|
137
143
|
"@ai-sdk/openai-compatible": {
|
|
138
144
|
"optional": true
|
|
139
145
|
},
|
|
146
|
+
"@astrojs/cloudflare": {
|
|
147
|
+
"optional": true
|
|
148
|
+
},
|
|
149
|
+
"@astrojs/netlify": {
|
|
150
|
+
"optional": true
|
|
151
|
+
},
|
|
152
|
+
"@astrojs/svelte": {
|
|
153
|
+
"optional": true
|
|
154
|
+
},
|
|
155
|
+
"@astrojs/vue": {
|
|
156
|
+
"optional": true
|
|
157
|
+
},
|
|
140
158
|
"@mixedbread/sdk": {
|
|
141
159
|
"optional": true
|
|
142
160
|
},
|
package/skills/blume/SKILL.md
CHANGED
|
@@ -18,7 +18,7 @@ The core idea: **the framework _is_ the template.** There's no starter to clone
|
|
|
18
18
|
|
|
19
19
|
## Quickstart
|
|
20
20
|
|
|
21
|
-
Blume needs **Node.js 22 or newer**. From an empty or existing project:
|
|
21
|
+
Blume needs **Node.js 22.12 or newer**. From an empty or existing project:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
npm i blume # install the package
|
|
@@ -41,7 +41,9 @@ description: Welcome to my docs.
|
|
|
41
41
|
|
|
42
42
|
Welcome! Use **Markdown** and built-in components — no imports required:
|
|
43
43
|
|
|
44
|
-
:::note
|
|
44
|
+
:::note
|
|
45
|
+
Blume ships callouts, cards, tabs, steps, and more.
|
|
46
|
+
:::
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
Navigation, search, and page metadata are inferred from your files as you add them.
|
|
@@ -50,7 +52,7 @@ Navigation, search, and page metadata are inferred from your files as you add th
|
|
|
50
52
|
|
|
51
53
|
- **Components** — callouts, cards, steps, tabs, accordions, badges, file trees, and parameter tables, usable in MDX with no imports.
|
|
52
54
|
- **Local search** — Orama in dev and production; Pagefind is one flag away for large sites. No hosted index.
|
|
53
|
-
- **AI** — `llms.txt`, raw Markdown URLs, Copy as Markdown, Open in chat, an Ask AI assistant, and
|
|
55
|
+
- **AI** — `llms.txt`, raw Markdown URLs, Copy as Markdown, Open in chat, an Ask AI assistant, and an MCP server endpoint served by the docs site itself.
|
|
54
56
|
- **Navigation** — inferred from files, refined with `meta.ts` or config.
|
|
55
57
|
- **SEO** — metadata, Open Graph images, RSS feeds, and JSON-LD.
|
|
56
58
|
- **Customization** — component overrides, React islands, custom pages, theme tokens, and a source-component registry via `blume add`.
|
|
@@ -5,7 +5,7 @@ description: Keep a Blume docs site in sync with the product it documents. Audit
|
|
|
5
5
|
|
|
6
6
|
# Update Blume Docs
|
|
7
7
|
|
|
8
|
-
Blume is a **markdown-first** documentation framework on Astro/Vite: content lives as Markdown/MDX under a content root (default `docs/`), navigation derives from the file tree plus optional `meta.ts` files,
|
|
8
|
+
Blume is a **markdown-first** documentation framework on Astro/Vite: content lives as Markdown/MDX under a content root (default `docs/`), navigation derives from the file tree plus optional `meta.ts` files, `blume build` validates frontmatter and duplicate routes, and `blume validate` checks links and anchors.
|
|
9
9
|
|
|
10
10
|
Your job is **docs maintenance, not docs authorship**: find where shipped, user-facing behavior has drifted from what the docs claim, fix exactly that, prove the site still builds, and deliver the result as a pull request. A run that finds nothing actionable ends with a short report and **no branch, no commit, no PR** — prefer a no-op over a noisy PR.
|
|
11
11
|
|
|
@@ -39,7 +39,8 @@ Your job is **docs maintenance, not docs authorship**: find where shipped, user-
|
|
|
39
39
|
- Match the surrounding pages: frontmatter shape, Blume components already in use, code-fence style, root-relative internal links.
|
|
40
40
|
|
|
41
41
|
5. **Verify.**
|
|
42
|
-
- Run the docs build (`blume build` or the repo's documented docs QA) — it validates
|
|
42
|
+
- Run the docs build (`blume build` or the repo's documented docs QA) — it validates frontmatter and duplicate routes.
|
|
43
|
+
- Run `blume validate` to check internal links and anchors.
|
|
43
44
|
- Run lint/format/typecheck when the repo's conventions call for them on docs changes.
|
|
44
45
|
- Fix failures your edits caused; report pre-existing failures separately instead of fixing them in this PR.
|
|
45
46
|
|
|
@@ -32,7 +32,8 @@ const usagePolicy = (
|
|
|
32
32
|
* agent-facing surface — llms.txt, the raw-Markdown mirrors, the MCP server,
|
|
33
33
|
* Ask AI, sitemap, and feeds — so agents can discover and cite the docs without
|
|
34
34
|
* scraping HTML. URLs are absolute when a `site` is configured and root-relative
|
|
35
|
-
* otherwise. Returns null when the manifest is
|
|
35
|
+
* (still under `deployment.base`) otherwise. Returns null when the manifest is
|
|
36
|
+
* disabled.
|
|
36
37
|
*/
|
|
37
38
|
export const buildAgentReadability = (
|
|
38
39
|
project: BlumeProject
|
|
@@ -43,13 +44,13 @@ export const buildAgentReadability = (
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
const site = config.deployment.site ?? null;
|
|
46
|
-
// Every artifact is served under `deployment.base
|
|
47
|
-
// `new URL()` so the subpath is preserved.
|
|
47
|
+
// Every artifact is served under `deployment.base` — with or without a
|
|
48
|
+
// `site`; concatenate rather than `new URL()` so the subpath is preserved.
|
|
48
49
|
const deployBase = normalizeBasePath(config.deployment.base);
|
|
49
|
-
const abs = (path: string): string =>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
const abs = (path: string): string => {
|
|
51
|
+
const based = withBasePath(deployBase, path);
|
|
52
|
+
return site ? `${site.replace(/\/+$/u, "")}${based}` : based;
|
|
53
|
+
};
|
|
53
54
|
|
|
54
55
|
const artifacts: Record<string, unknown> = {
|
|
55
56
|
markdown: {
|
|
@@ -57,7 +58,7 @@ export const buildAgentReadability = (
|
|
|
57
58
|
pattern: abs("/{route}.md"),
|
|
58
59
|
},
|
|
59
60
|
};
|
|
60
|
-
if (config.ai.llmsTxt) {
|
|
61
|
+
if (config.ai.llmsTxt.enabled) {
|
|
61
62
|
artifacts.llmsFullTxt = abs("/llms-full.txt");
|
|
62
63
|
artifacts.llmsTxt = abs("/llms.txt");
|
|
63
64
|
}
|
package/src/ai/ask-context.ts
CHANGED
|
@@ -124,8 +124,9 @@ const lastUserMessage = (messages: AskMessage[]): string => {
|
|
|
124
124
|
* where "How does Ask AI work?" retrieves the right page but only sees its
|
|
125
125
|
* opening paragraph. This centers the window on the densest cluster of query
|
|
126
126
|
* terms so the injected text is the part that actually answers the question.
|
|
127
|
+
* Exported for testing; {@link createAskContext} is the runtime entry point.
|
|
127
128
|
*/
|
|
128
|
-
const relevantExcerpt = (
|
|
129
|
+
export const relevantExcerpt = (
|
|
129
130
|
content: string,
|
|
130
131
|
query: string,
|
|
131
132
|
max: number
|
|
@@ -177,7 +178,11 @@ const relevantExcerpt = (
|
|
|
177
178
|
best = start;
|
|
178
179
|
}
|
|
179
180
|
}
|
|
180
|
-
|
|
181
|
+
// Cap the lead-in at half the window: under a tight remaining budget `max`
|
|
182
|
+
// can be smaller than EXCERPT_LEAD, and an uncapped `best - EXCERPT_LEAD`
|
|
183
|
+
// start would end the slice before the very match it centered on.
|
|
184
|
+
const lead = Math.min(EXCERPT_LEAD, Math.floor(max / 2));
|
|
185
|
+
return withEllipsis(Math.max(0, best - lead));
|
|
181
186
|
};
|
|
182
187
|
|
|
183
188
|
/**
|
package/src/ai/ask-data.ts
CHANGED
|
@@ -9,9 +9,12 @@ import type { AskData } from "./ask-context.ts";
|
|
|
9
9
|
* MCP snapshot) so retrieval can be filtered to the current page's language, and
|
|
10
10
|
* content is kept as Markdown so grounding sees fenced code examples — the model
|
|
11
11
|
* answers "what does the config look like?" from the docs instead of declining.
|
|
12
|
+
* The reader is an AI agent, so `<Visibility>` resolves for the agents audience
|
|
13
|
+
* (web-only content removed, agents-only unwrapped), matching llms-full.txt.
|
|
12
14
|
*/
|
|
13
15
|
export const buildAskData = async (project: BlumeProject): Promise<AskData> => {
|
|
14
16
|
const documents = await buildSearchDocuments(project, {
|
|
17
|
+
audience: "agents",
|
|
15
18
|
content: "markdown",
|
|
16
19
|
includeWhenDisabled: true,
|
|
17
20
|
});
|