blume 0.4.0 → 0.5.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/dist/cli/index.js +1170 -820
- package/dist/cli/index.js.map +32 -27
- package/dist/types/core/data.d.ts +2 -0
- package/dist/types/core/project.d.ts +12 -2
- package/dist/types/core/schema.d.ts +154 -41
- package/dist/types/core/types.d.ts +7 -6
- package/dist/types/migrate/mintlify/config.d.ts +14 -0
- package/docs/01-quickstart.mdx +6 -2
- package/docs/02-deployment.mdx +3 -1
- package/docs/advanced/api-reference.mdx +37 -23
- package/docs/advanced/bridge.mdx +76 -0
- package/docs/advanced/custom-pages.mdx +3 -1
- package/docs/advanced/meta.ts +8 -1
- package/docs/advanced/migrate.mdx +123 -0
- package/docs/configuration/ai.mdx +3 -1
- package/docs/configuration/analytics.mdx +3 -1
- package/docs/configuration/export.mdx +6 -2
- package/docs/configuration/index.mdx +1 -1
- package/docs/configuration/seo.mdx +3 -1
- package/docs/content/components.mdx +55 -2
- package/docs/content/i18n.mdx +6 -2
- package/docs/content/islands.mdx +6 -2
- package/docs/content/meta.mdx +3 -1
- package/docs/content/syntax.mdx +40 -14
- package/docs/index.mdx +2 -2
- package/docs/reference/cli.mdx +29 -1
- package/docs/reference/frontmatter.mdx +5 -0
- package/package.json +11 -1
- package/src/astro/generate.ts +18 -9
- package/src/astro/templates.ts +28 -4
- package/src/cli/commands/build.ts +107 -63
- package/src/cli/commands/check.ts +20 -0
- package/src/cli/dev-lock.ts +13 -5
- package/src/cli/prepare.ts +3 -0
- package/src/components/BlumePage.astro +6 -0
- package/src/components/Icon.astro +13 -10
- package/src/components/content/ApiField.astro +75 -0
- package/src/components/content/ParamField.astro +39 -0
- package/src/components/content/RequestField.astro +23 -0
- package/src/components/content/ResponseField.astro +23 -0
- package/src/components/content/Step.astro +1 -1
- package/src/components/layout/Breadcrumbs.astro +7 -2
- package/src/components/layout/NavTree.astro +24 -8
- package/src/components/layout/RootLayout.astro +56 -34
- package/src/components/layout/Search.astro +1 -1
- package/src/components/openapi/ApiOverview.astro +84 -0
- package/src/components/openapi/MethodBadge.astro +28 -0
- package/src/components/openapi/Operation.astro +140 -0
- package/src/components/openapi/ParametersTable.astro +97 -0
- package/src/components/openapi/RequestBody.astro +58 -0
- package/src/components/openapi/RequestPanel.astro +169 -0
- package/src/components/openapi/Responses.astro +91 -0
- package/src/components/openapi/SchemaProperty.astro +118 -0
- package/src/components/openapi/SchemaTable.astro +86 -0
- package/src/components/openapi/helpers.ts +238 -0
- package/src/components/openapi/panel.ts +59 -0
- package/src/components/openapi/snippets.ts +201 -0
- package/src/core/builtin-tags.ts +5 -0
- package/src/core/data.ts +2 -0
- package/src/core/graph.ts +0 -3
- package/src/core/nav-diagnostics.ts +2 -12
- package/src/core/navigation.ts +0 -10
- package/src/core/project-graph.ts +5 -1
- package/src/core/project.ts +25 -3
- package/src/core/schema.ts +47 -14
- package/src/core/sources/mintlify.ts +1 -1
- package/src/core/sources/resolve.ts +28 -6
- package/src/core/types.ts +7 -7
- package/src/migrate/mintlify/config.ts +190 -97
- package/src/migrate/mintlify/content.ts +24 -2
- package/src/migrate/mintlify/index.ts +76 -2
- package/src/migrate/mintlify/transform.ts +2 -0
- package/src/openapi/model.ts +174 -0
- package/src/openapi/parse.ts +48 -0
- package/src/openapi/references.ts +164 -0
- package/src/openapi/render-mdx.ts +76 -0
- package/src/openapi/scalar.ts +15 -103
- package/src/openapi/source.ts +140 -0
- package/src/registry/eject.ts +15 -2
- package/src/theme/chrome-icons.ts +22 -0
- package/src/theme/icons.ts +151 -161
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Bridge
|
|
3
|
+
description: Run blume dev directly on a Mintlify codebase — no config, no migration, no file changes. Blume detects docs.json and serves it in place.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Bridge mode lets you point Blume at a **Mintlify** project and run it as-is. There's no config to write and no migration to commit: drop `blume dev` into a directory that has a `docs.json` (or legacy `mint.json`) and Blume detects it, synthesizes an equivalent config in memory, and serves your existing MDX — transformed to Blume idiom on the fly, on disk untouched.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
cd my-mintlify-docs
|
|
10
|
+
npx blume dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```txt
|
|
14
|
+
ℹ Detected docs.json — running in Mintlify bridge mode (no migration).
|
|
15
|
+
Run "blume migrate mintlify" to convert permanently.
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
It's the zero-commitment way to see what your docs look like on Blume — you can keep running `mintlify dev` in one terminal and `blume dev` in another, side by side, and decide later.
|
|
19
|
+
|
|
20
|
+
## When it activates
|
|
21
|
+
|
|
22
|
+
Bridge mode is entirely automatic, gated on two conditions:
|
|
23
|
+
|
|
24
|
+
- **No Blume config.** There's no `blume.config.{ts,js,mjs}` at the project root. An explicit Blume config always wins — the moment one exists, Blume runs a normal project and bridge mode never triggers.
|
|
25
|
+
- **A Mintlify config is present.** A `docs.json` or `mint.json` sits at the root.
|
|
26
|
+
|
|
27
|
+
With both true, Blume treats the Mintlify config as its source of truth for that run.
|
|
28
|
+
|
|
29
|
+
:::note
|
|
30
|
+
Bridge mode applies to `blume build` too, not just `blume dev` — you can produce a static site from an unconverted Mintlify project. Only `blume dev` prints the detection notice.
|
|
31
|
+
:::
|
|
32
|
+
|
|
33
|
+
## What happens under the hood
|
|
34
|
+
|
|
35
|
+
Bridge mode is the **read-only twin** of [`blume migrate mintlify`](/docs/advanced/migrate#mintlify): the same translation, without writing anything back.
|
|
36
|
+
|
|
37
|
+
- **Config is synthesized in memory.** `docs.json` is translated to a Blume config — navigation, theme, and chrome mapped across — exactly as the migrator would, but nothing is written to disk.
|
|
38
|
+
- **Content is served through a Mintlify source.** The config's content block is rewired to a single [`mintlify` content source](/docs/content/sources) rooted at the project. Each MDX page is transformed to Blume markup **at scan time** as it's read, so your files never change.
|
|
39
|
+
- **Variables are inlined at scan time.** `docs.json` `variables` (`{{name}}`) are substituted into content as it's scanned — Blume has no runtime substitution.
|
|
40
|
+
- **Assets are served in place.** Referenced folders like `images/` are served through [`content.assets`](/docs/content/sources) rather than moved to `public/`, so nothing is relocated.
|
|
41
|
+
- **Languages map to i18n.** A multi-language `docs.json` maps to Blume's [`i18n`](/docs/content/i18n), with the language switch handled by Blume's locale routing instead of a nav selector.
|
|
42
|
+
|
|
43
|
+
Because it reads the same `docs.json` and runs the same transforms, what you see in bridge mode is what you'd get from a full migration.
|
|
44
|
+
|
|
45
|
+
## Bridge vs. migrate
|
|
46
|
+
|
|
47
|
+
<CardGroup cols={2}>
|
|
48
|
+
<Card title="Bridge mode" icon="cable">
|
|
49
|
+
**Try Blume with zero changes.** Nothing is written; your Mintlify project
|
|
50
|
+
stays exactly as it is. Ideal for evaluating Blume, running both dev servers
|
|
51
|
+
side by side, or a reversible spike.
|
|
52
|
+
</Card>
|
|
53
|
+
<Card title="Migrate" href="/docs/advanced/migrate" icon="arrow-right">
|
|
54
|
+
**Convert for good.** [`blume migrate mintlify`](/docs/advanced/migrate)
|
|
55
|
+
rewrites your pages, config, and assets in place so Blume becomes the source
|
|
56
|
+
of truth. Do this once you've decided to switch.
|
|
57
|
+
</Card>
|
|
58
|
+
</CardGroup>
|
|
59
|
+
|
|
60
|
+
Everything you can do in bridge mode, you can do permanently by migrating — bridge is the preview, migrate is the commit.
|
|
61
|
+
|
|
62
|
+
## Limitations
|
|
63
|
+
|
|
64
|
+
- **Mintlify only.** Bridge detection is Mintlify-specific. The other frameworks — Fumadocs, Nextra, Starlight — need a [one-shot migration](/docs/advanced/migrate).
|
|
65
|
+
- **Same idiom gaps as the migrator.** Components without a Blume equivalent are transformed on a best-effort basis; when you hit one, [migrate](/docs/advanced/migrate) and address the warnings, or switch that page to a Blume-native equivalent such as the [OpenAPI reference](/docs/advanced/api-reference).
|
|
66
|
+
- **No runtime variables.** As with a migration, `{{variable}}` values are inlined at scan time rather than substituted at runtime.
|
|
67
|
+
|
|
68
|
+
<CardGroup cols={2}>
|
|
69
|
+
<Card title="Migrate" href="/docs/advanced/migrate" icon="arrow-right">
|
|
70
|
+
Convert a Mintlify, Fumadocs, Nextra, or Starlight project permanently.
|
|
71
|
+
</Card>
|
|
72
|
+
<Card title="Content sources" href="/docs/content/sources" icon="folder-tree">
|
|
73
|
+
How the `mintlify` source and `content.assets` fit into Blume's content
|
|
74
|
+
graph.
|
|
75
|
+
</Card>
|
|
76
|
+
</CardGroup>
|
|
@@ -260,7 +260,9 @@ import data from "blume:data";
|
|
|
260
260
|
</RootLayout>
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
-
:::note
|
|
263
|
+
:::note
|
|
264
|
+
`RootLayout` is part of the generated runtime, so its props can change between releases. When you want a layout that's fully yours, [`blume eject`](/docs/configuration/customization#eject) turns `.blume/` into a standard Astro project you own outright.
|
|
265
|
+
:::
|
|
264
266
|
|
|
265
267
|
## 404 page
|
|
266
268
|
|
package/docs/advanced/meta.ts
CHANGED
|
@@ -2,6 +2,13 @@ import { defineMeta } from "blume";
|
|
|
2
2
|
|
|
3
3
|
export default defineMeta({
|
|
4
4
|
order: 5,
|
|
5
|
-
pages: [
|
|
5
|
+
pages: [
|
|
6
|
+
"migrate",
|
|
7
|
+
"bridge",
|
|
8
|
+
"custom-pages",
|
|
9
|
+
"changelog",
|
|
10
|
+
"blog",
|
|
11
|
+
"api-reference",
|
|
12
|
+
],
|
|
6
13
|
title: "Advanced",
|
|
7
14
|
});
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Migrate
|
|
3
|
+
description: Convert a Mintlify, Fumadocs, Nextra, or Starlight project to Blume in one command — config, content, navigation, and assets translated to idiomatic Blume.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Already have a docs site somewhere else? `blume migrate` is a one-shot codemod that converts a project from another docs framework into Blume — translating the config, rewriting each page to idiomatic Blume MDX, converting navigation files, and relocating assets, all in place. When it finishes you have a `blume.config.ts` and a tree that `blume dev` can serve.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx blume migrate <tool>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The `<tool>` is the framework you're coming from:
|
|
13
|
+
|
|
14
|
+
| Tool | Detects | Command |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| [Mintlify](#mintlify) | `docs.json` / `mint.json` | `blume migrate mintlify` |
|
|
17
|
+
| [Fumadocs](#fumadocs) | `content/docs` + `meta.json` | `blume migrate fumadocs` |
|
|
18
|
+
| [Nextra](#nextra) | `content/` or `pages/` + `_meta` | `blume migrate nextra` |
|
|
19
|
+
| [Starlight](#starlight) | `src/content/docs` + `astro.config.*` | `blume migrate starlight` |
|
|
20
|
+
|
|
21
|
+
:::warning
|
|
22
|
+
A migration **rewrites files in place** — pages, config, navigation, and assets. Commit (or stash) your work first so you can review the diff and roll back cleanly.
|
|
23
|
+
:::
|
|
24
|
+
|
|
25
|
+
## What a migration does
|
|
26
|
+
|
|
27
|
+
Every migrator runs the same shape of work, tuned to the source framework:
|
|
28
|
+
|
|
29
|
+
<Steps>
|
|
30
|
+
<Step title="Translate the config">
|
|
31
|
+
The framework's config — `docs.json`, a `starlight({...})` block, and so on — becomes a `blume.config.ts` at your project root, with navigation, theme, and site chrome mapped across.
|
|
32
|
+
</Step>
|
|
33
|
+
<Step title="Rewrite every page">
|
|
34
|
+
Each `.md`/`.mdx` file is rewritten to idiomatic Blume markup: framework callouts become [`:::` directives](/docs/content/syntax), components are renamed or converted, and frontmatter is mapped to Blume's [page schema](/docs/reference/frontmatter). Keys Blume doesn't recognize are dropped and reported.
|
|
35
|
+
</Step>
|
|
36
|
+
<Step title="Convert navigation">
|
|
37
|
+
Navigation files (`_meta.{js,ts,json}`, `meta.json`) become typed [`meta.ts`](/docs/content/meta) files, preserving order and titles.
|
|
38
|
+
</Step>
|
|
39
|
+
<Step title="Relocate assets and scripts">
|
|
40
|
+
Referenced asset folders are kept in place and served via [`content.assets`](/docs/content/sources); loose top-level files move under `public/`. Your `dev`/`build`/`start` npm scripts are repointed at the matching `blume` commands.
|
|
41
|
+
</Step>
|
|
42
|
+
</Steps>
|
|
43
|
+
|
|
44
|
+
When it's done the CLI prints how many files it touched, a list of **warnings** — anything that needs a human eye, like a component with no Blume equivalent or a dropped frontmatter key — and a reminder to review the generated config:
|
|
45
|
+
|
|
46
|
+
```txt
|
|
47
|
+
✔ Migrated 42 content file(s).
|
|
48
|
+
⚠ Components without a Blume equivalent need manual review: <Frame>.
|
|
49
|
+
⚠ Dropped unsupported page frontmatter keys: mode, "og:image".
|
|
50
|
+
▶ Review blume.config.ts and run `blume dev`.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Tools
|
|
54
|
+
|
|
55
|
+
### Mintlify
|
|
56
|
+
|
|
57
|
+
Reads `docs.json` (or legacy `mint.json`) and rewrites every page **in place** — content stays at the project root (`content.root` is `"."`).
|
|
58
|
+
|
|
59
|
+
- Snippets under `/snippets` are inlined as includes; component snippets (e.g. `.jsx`) are kept and their imports rewritten to relative paths.
|
|
60
|
+
- A Mintlify `openapi` spec — declared top-level or on a nav group (a path, URL, or `{ source, directory }`) — maps to Blume's [native OpenAPI reference](/docs/advanced/api-reference) (`openapi.sources`), which renders one real page per operation. A group's `directory` becomes the reference's route; endpoint refs like `GET /users` are dropped since Blume generates them from the spec.
|
|
61
|
+
- `docs.json` `variables` are inlined into content — Blume has no runtime `{{variable}}` substitution.
|
|
62
|
+
- Multi-language projects map to [`i18n.locales`](/docs/content/i18n); the language nav selector is dropped in favor of Blume's locale switching.
|
|
63
|
+
- Icons resolve against the real bundled libraries — Font Awesome (free), Lucide, and Tabler. The migrator sets [`icons.library: fontawesome`](/docs/content/components#default-library) (Mintlify's default), so Font Awesome names (`shield-halved`, `gauge-high`, `layer-group`, …) and `iconType` styles render unchanged. Pro-only FA styles (`light`/`thin`/`duotone`/`sharp-solid`) fall back to solid.
|
|
64
|
+
- Fonts map to [`theme.fonts`](/docs/configuration/theming) when the family is one of Blume's curated Google Fonts (`fonts.family`, or a `heading`/`body` split); a family outside that set is warned about, not guessed. Header links (`navbar.links`/`navbar.primary`) and footer socials (`footer.socials`) have no `blume.config` equivalent yet, so they're reported as warnings rather than dropped silently — re-add them with [`navigation.tabs`](/docs/content/navigation) or a Header/Footer [layout override](/docs/advanced/custom-pages). The contextual page menu and last-updated timestamp are already Blume defaults.
|
|
65
|
+
- Field components — [`<ParamField>`, `<ResponseField>`, `<RequestField>`](/docs/content/components#api-fields) — render natively via Blume's compat components, so hand-written CLI/SDK/endpoint field docs carry over unchanged. Any remaining component with no Blume equivalent (e.g. `<Update>`) is flagged for manual review.
|
|
66
|
+
|
|
67
|
+
:::tip
|
|
68
|
+
Want to preview Blume against a Mintlify codebase **without** rewriting anything? Run `blume dev` with no config and Blume serves `docs.json` as-is in [Bridge mode](/docs/advanced/bridge). Migrate when you're ready to commit.
|
|
69
|
+
:::
|
|
70
|
+
|
|
71
|
+
### Fumadocs
|
|
72
|
+
|
|
73
|
+
Reads `content/docs` + `meta.json`. Moves pages into `docs/`, preserving the `/docs` route prefix, and rewrites Fumadocs MDX to Blume markup: callouts, `<Cards>`/`<Accordions>`/`<Files>`, `<Tabs items>`, and `<include>` directives are all converted. Each `meta.json` becomes a typed `meta.ts`.
|
|
74
|
+
|
|
75
|
+
### Nextra
|
|
76
|
+
|
|
77
|
+
Reads `content/` or `pages/` plus `_meta` files. Moves pages into `docs/`, rewrites `<Callout>`s to [directives](/docs/content/syntax), and converts every `_meta.{js,ts,json}` into a typed `meta.ts` — navigation order and titles preserved.
|
|
78
|
+
|
|
79
|
+
### Starlight
|
|
80
|
+
|
|
81
|
+
Reads `src/content/docs` + your `astro.config.*`. Translates the `starlight({...})` options into `blume.config.ts` and rewrites each page **in place** (content stays under `src/content/docs`): asides become directives, components are renamed, and frontmatter is mapped across.
|
|
82
|
+
|
|
83
|
+
## After migrating
|
|
84
|
+
|
|
85
|
+
<Steps>
|
|
86
|
+
<Step title="Review the config">
|
|
87
|
+
Open `blume.config.ts` and check the mapped navigation, theme, and site
|
|
88
|
+
settings. The migrator is thorough but conservative — some source options
|
|
89
|
+
have no Blume equivalent and are left out.
|
|
90
|
+
</Step>
|
|
91
|
+
<Step title="Read the warnings">
|
|
92
|
+
Each warning points at something the codemod couldn't fully translate. Work
|
|
93
|
+
through them before shipping.
|
|
94
|
+
</Step>
|
|
95
|
+
<Step title="Run the dev server">
|
|
96
|
+
Serve the migrated site. Blume [validates your content](/docs/reference/cli#validating-links) as it serves it, so broken links, missing anchors, and schema errors surface immediately.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
blume dev
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
</Step>
|
|
103
|
+
<Step title="Delete leftovers">
|
|
104
|
+
Old framework files (lockfile entries, `astro.config`, `theme.config`,
|
|
105
|
+
framework dependencies) are left untouched so nothing is lost. Remove them
|
|
106
|
+
by hand once you've confirmed the site builds.
|
|
107
|
+
</Step>
|
|
108
|
+
</Steps>
|
|
109
|
+
|
|
110
|
+
<CardGroup cols={2}>
|
|
111
|
+
<Card title="Bridge mode" href="/docs/advanced/bridge" icon="cable">
|
|
112
|
+
Serve a Mintlify project with `blume dev` — no migration, no file changes.
|
|
113
|
+
</Card>
|
|
114
|
+
<Card title="CLI reference" href="/docs/reference/cli" icon="terminal">
|
|
115
|
+
Every command and flag, including `blume migrate`.
|
|
116
|
+
</Card>
|
|
117
|
+
<Card title="Content sources" href="/docs/content/sources" icon="folder-tree">
|
|
118
|
+
How Blume scans content, assets, and remote sources into a site.
|
|
119
|
+
</Card>
|
|
120
|
+
<Card title="Frontmatter" href="/docs/reference/frontmatter" icon="file-text">
|
|
121
|
+
The page schema your migrated frontmatter is mapped onto.
|
|
122
|
+
</Card>
|
|
123
|
+
</CardGroup>
|
|
@@ -125,7 +125,9 @@ ai: {
|
|
|
125
125
|
|
|
126
126
|
Set `apiKeyEnv` (and, for the named providers, `baseUrl`) on any backend to point at a different env var or proxy.
|
|
127
127
|
|
|
128
|
-
:::note
|
|
128
|
+
:::note
|
|
129
|
+
**Inkeep** answers from the content you've indexed in the Inkeep dashboard — it runs its own retrieval — so Blume leaves it ungrounded. Every other backend is [grounded](#grounding) in this site's pages.
|
|
130
|
+
:::
|
|
129
131
|
|
|
130
132
|
Keys are read with `process.env`, which covers the Node, Vercel, and Netlify adapters. On Cloudflare, expose the key through the platform's [runtime binding](https://docs.astro.build/en/guides/integrations-guide/cloudflare/#environment-variables-and-secrets). Enabling Ask AI also turns on React for the in-page island — see [Customization](/docs/configuration/customization#interactive-islands).
|
|
131
133
|
|
|
@@ -7,7 +7,9 @@ Blume injects analytics for you from a single `analytics` block in `blume.config
|
|
|
7
7
|
|
|
8
8
|
Analytics loads in **production builds only**. The scripts are emitted by `blume build`, never by `blume dev`, so local traffic never reaches your dashboards and you don't need a separate "development" project.
|
|
9
9
|
|
|
10
|
-
:::note
|
|
10
|
+
:::note
|
|
11
|
+
Analytics is opt-in. With no `analytics` block, Blume injects nothing.
|
|
12
|
+
:::
|
|
11
13
|
|
|
12
14
|
## Vercel Web Analytics
|
|
13
15
|
|
|
@@ -30,7 +30,9 @@ Any format you omit (or set to `false`) is left out of the menu. With both off
|
|
|
30
30
|
|
|
31
31
|
Because it prints the live, fully-styled page, the result keeps crisp, selectable text, real fonts, and syntax-highlighted code. It needs no dependencies and works the same in dev, in production, and on static hosts.
|
|
32
32
|
|
|
33
|
-
:::note
|
|
33
|
+
:::note
|
|
34
|
+
PDF export goes through the browser's native print dialog, so the exact "Save as PDF" wording and options depend on the browser. Enable **Background graphics** in the dialog to keep code-block and callout backgrounds.
|
|
35
|
+
:::
|
|
34
36
|
|
|
35
37
|
## EPUB
|
|
36
38
|
|
|
@@ -42,4 +44,6 @@ To keep the file readable on a device with no stylesheet or JavaScript of its ow
|
|
|
42
44
|
|
|
43
45
|
Both formats export the **single page** a reader is viewing — not the whole site — which matches where the action lives, beneath that page's table of contents.
|
|
44
46
|
|
|
45
|
-
:::note
|
|
47
|
+
:::note
|
|
48
|
+
In an EPUB there's no JavaScript to switch tabs, so tabbed content — like [package-install](/docs/content/syntax) blocks and code groups — is expanded to show every panel at once. Client-rendered embeds such as Mermaid diagrams aren't included.
|
|
49
|
+
:::
|
|
@@ -187,7 +187,7 @@ content: {
|
|
|
187
187
|
}
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
This is mainly useful after migrating from a tool that serves assets from the project root (like Mintlify), so references such as `` keep resolving without relocating every file.
|
|
190
|
+
This is mainly useful after [migrating](/docs/advanced/migrate) from a tool that serves assets from the project root (like Mintlify), so references such as `` keep resolving without relocating every file. [Bridge mode](/docs/advanced/bridge) uses the same mechanism to serve a Mintlify project's assets in place, untouched.
|
|
191
191
|
|
|
192
192
|
## Last modified
|
|
193
193
|
|
|
@@ -94,7 +94,9 @@ seo:
|
|
|
94
94
|
---
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
:::note
|
|
97
|
+
:::note
|
|
98
|
+
OG rendering uses hex internally, so an `oklch` custom accent falls back to the default. Use a named accent (`blue`, `teal`, …) or a hex value for custom cards.
|
|
99
|
+
:::
|
|
98
100
|
|
|
99
101
|
`seo.image` is frontmatter, so it only covers Markdown and MDX content. To give a custom [`.astro` page](/docs/advanced/custom-pages) its own social image — a marketing home or landing page, and the way to give the home page alone a bespoke share image — pass the `ogImage` prop to `PageLayout`.
|
|
100
102
|
|
|
@@ -125,7 +125,7 @@ A negative or breaking state, such as a deprecation.
|
|
|
125
125
|
|
|
126
126
|
## Icon
|
|
127
127
|
|
|
128
|
-
Render an icon
|
|
128
|
+
Render an icon by name — the same `icon` props power cards, steps, tiles, tabs, and sidebar entries. Names come from three bundled libraries: [Lucide](https://lucide.dev) (the default), [Font Awesome](https://fontawesome.com/icons) (its free set), and [Tabler](https://tabler.io/icons). Names are lowercase and kebab-cased (`rocket`, `gauge-high`, `book-open`).
|
|
129
129
|
|
|
130
130
|
<Icon icon="rocket" size={20} />
|
|
131
131
|
|
|
@@ -133,7 +133,26 @@ Render an icon from Blume's built-in set by name — the same set the `icon` pro
|
|
|
133
133
|
<Icon icon="rocket" size={20} />
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
A bare name resolves against your project's [`icons.library`](#default-library) (Lucide unless you change it). Two ways to reach another library for a single icon:
|
|
137
|
+
|
|
138
|
+
- **`iconType`** selects a Font Awesome style — `solid` (default), `regular`, or `brands`: `<Icon icon="github" iconType="brands" />`. Font Awesome Pro styles (`light`, `thin`, `duotone`, `sharp-solid`) aren't in the bundled free data and fall back to solid.
|
|
139
|
+
- **A `library:name` prefix** overrides the default per icon: `fa6-solid:gauge-high`, `fa6-brands:github`, `lucide:rocket`, `tabler:heart`.
|
|
140
|
+
|
|
141
|
+
`size` sets the pixel size (default `16`) and `color` tints it (any CSS color; defaults to `currentColor`). Pass a raw `<svg>` string, an image URL, or a local image path in place of a name to render your own art, and add a `label` to expose it to assistive tech — without one, the icon is decorative.
|
|
142
|
+
|
|
143
|
+
Icons resolve at build time and inline as zero-JS SVG — nothing is fetched at runtime.
|
|
144
|
+
|
|
145
|
+
### Default library
|
|
146
|
+
|
|
147
|
+
Set which library bare icon names resolve against:
|
|
148
|
+
|
|
149
|
+
```ts title="blume.config.ts"
|
|
150
|
+
export default defineConfig({
|
|
151
|
+
icons: { library: "fontawesome" }, // "lucide" (default) | "fontawesome" | "tabler"
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
A `library:name` prefix always wins over this, so you can mix libraries on any default. Migrating from Mintlify sets this to `fontawesome` for you (Mintlify's default), so your existing icon names keep working.
|
|
137
156
|
|
|
138
157
|
## File tree
|
|
139
158
|
|
|
@@ -438,6 +457,40 @@ Show or hide content by audience. `for="web"` renders only on the site; `for="ag
|
|
|
438
457
|
<Visibility for="agents">Shown only in the generated Markdown.</Visibility>
|
|
439
458
|
```
|
|
440
459
|
|
|
460
|
+
## API fields
|
|
461
|
+
|
|
462
|
+
Document a single request/response field — a CLI flag, an SDK argument, an endpoint parameter — with its name, type, and description. `ParamField`, `ResponseField`, and `RequestField` are Mintlify-compatible, so a migrated site's field markup renders unchanged. Each takes a `type`, plus `required`, `deprecated`, and `default`; the description is the element's body and may hold rich MDX, including a nested [Expandable](#expandable) for sub-properties.
|
|
463
|
+
|
|
464
|
+
`ParamField` names the field through the attribute that marks its location — `path`, `query`, `header`, or `body` (or a plain `name`); the location shows as a small label.
|
|
465
|
+
|
|
466
|
+
<ParamField path="userId" type="string" required>
|
|
467
|
+
The unique identifier of the user.
|
|
468
|
+
</ParamField>
|
|
469
|
+
|
|
470
|
+
<ParamField query="limit" type="integer" default="20">
|
|
471
|
+
Maximum number of results to return per page.
|
|
472
|
+
</ParamField>
|
|
473
|
+
|
|
474
|
+
<ResponseField name="createdAt" type="string">
|
|
475
|
+
ISO 8601 timestamp for when the record was created.
|
|
476
|
+
</ResponseField>
|
|
477
|
+
|
|
478
|
+
```mdx
|
|
479
|
+
<ParamField path="userId" type="string" required>
|
|
480
|
+
The unique identifier of the user.
|
|
481
|
+
</ParamField>
|
|
482
|
+
|
|
483
|
+
<ParamField query="limit" type="integer" default="20">
|
|
484
|
+
Maximum number of results to return per page.
|
|
485
|
+
</ParamField>
|
|
486
|
+
|
|
487
|
+
<ResponseField name="createdAt" type="string">
|
|
488
|
+
ISO 8601 timestamp for when the record was created.
|
|
489
|
+
</ResponseField>
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
For a full spec-driven API reference — one page per operation with generated schemas — use the [OpenAPI reference](/docs/advanced/api-reference) instead.
|
|
493
|
+
|
|
441
494
|
## Type tables
|
|
442
495
|
|
|
443
496
|
Tables for documenting an object's properties — its props, types, and defaults. Write the rows by hand with `TypeTable`, or generate them straight from a TypeScript interface or type alias with `AutoTypeTable`.
|
package/docs/content/i18n.mdx
CHANGED
|
@@ -22,7 +22,9 @@ i18n: {
|
|
|
22
22
|
|
|
23
23
|
Each locale has a `code` (used in URLs), a `label` (shown in the language switcher), and an optional `dir` for right-to-left scripts (`"ltr"` by default).
|
|
24
24
|
|
|
25
|
-
:::tip
|
|
25
|
+
:::tip
|
|
26
|
+
Migrating from Mintlify? [`blume migrate mintlify`](/docs/advanced/migrate) reads `navigation.languages[]` and writes the `i18n` block for you — the `default: true` language becomes `defaultLocale`, and translated folders already match Blume's layout.
|
|
27
|
+
:::
|
|
26
28
|
|
|
27
29
|
## Organize translated content
|
|
28
30
|
|
|
@@ -98,7 +100,9 @@ i18n: {
|
|
|
98
100
|
|
|
99
101
|
Fallback pages are excluded from the search index and aren't advertised as real translations in `hreflang`, so untranslated content doesn't compete for ranking. They still appear in that locale's sidebar, so navigation stays complete — a reader can reach every page in any language.
|
|
100
102
|
|
|
101
|
-
:::tip
|
|
103
|
+
:::tip
|
|
104
|
+
Start by translating your most important pages — the homepage, quickstart, and top guides — and let the rest fall back. You can fill in translations over time without breaking any links.
|
|
105
|
+
:::
|
|
102
106
|
|
|
103
107
|
## The language switcher
|
|
104
108
|
|
package/docs/content/islands.mdx
CHANGED
|
@@ -24,7 +24,9 @@ Here's a live counter: <Counter />
|
|
|
24
24
|
|
|
25
25
|
The filename is the component name, so it **must be a PascalCase identifier** — letters, digits, and underscores only (`Counter.tsx` → `<Counter />`). Lowercase filenames, names with dashes/dots/spaces (like `Time-Picker.tsx`), and two islands that resolve to the same name are skipped with a build warning.
|
|
26
26
|
|
|
27
|
-
:::note
|
|
27
|
+
:::note
|
|
28
|
+
Islands are for **interactive** UI. For a static component you reuse across pages (a styled callout, a pricing table), use an [MDX override](/docs/configuration/customization) instead — it ships no JavaScript.
|
|
29
|
+
:::
|
|
28
30
|
|
|
29
31
|
## Registering islands in `components.ts`
|
|
30
32
|
|
|
@@ -98,7 +100,9 @@ const on = ref(false);
|
|
|
98
100
|
|
|
99
101
|
Props you pass in MDX (`<Counter start={5} />`) are forwarded to the component, and children (`<Counter>label</Counter>`) arrive as the default slot.
|
|
100
102
|
|
|
101
|
-
:::tip
|
|
103
|
+
:::tip
|
|
104
|
+
Islands hydrate on the client, so anything you pass as a prop must be serializable — strings, numbers, plain objects, not functions.
|
|
105
|
+
:::
|
|
102
106
|
|
|
103
107
|
## Hooks
|
|
104
108
|
|
package/docs/content/meta.mdx
CHANGED
|
@@ -45,7 +45,9 @@ The `pages` array lists children by slug — the folder or file name with its nu
|
|
|
45
45
|
- **`group`** — a collapsible `<details>` disclosure. Pair it with `collapsed` to set the initial state; a group containing the current page always starts open.
|
|
46
46
|
- **`page`** — a single row that, when clicked, slides the sidebar into a sub-panel showing only that group's items, with a back arrow at the top. The panel is route-aware, so landing directly on a page inside the group opens straight to it.
|
|
47
47
|
|
|
48
|
-
:::tip
|
|
48
|
+
:::tip
|
|
49
|
+
`page` mode keeps deep sections tidy — reach for it when a group has many children and you'd rather drill into it than scroll past it.
|
|
50
|
+
:::
|
|
49
51
|
|
|
50
52
|
`display` works the same on a group in an [explicit sidebar](/docs/content/navigation#explicit-sidebar) config.
|
|
51
53
|
|
package/docs/content/syntax.mdx
CHANGED
|
@@ -242,7 +242,9 @@ config.title;
|
|
|
242
242
|
```
|
|
243
243
|
````
|
|
244
244
|
|
|
245
|
-
:::note
|
|
245
|
+
:::note
|
|
246
|
+
Hide the language icons or wrap long lines instead of scrolling with `markdown: { code: { icons: false, wrap: true } }` in `blume.config.ts`.
|
|
247
|
+
:::
|
|
246
248
|
|
|
247
249
|
## Package install
|
|
248
250
|
|
|
@@ -288,60 +290,82 @@ Callouts pull a reader's attention to context, advice, or risk. Write them as `:
|
|
|
288
290
|
|
|
289
291
|
Neutral, supporting context the reader should keep in mind.
|
|
290
292
|
|
|
291
|
-
:::note
|
|
293
|
+
:::note
|
|
294
|
+
Blume regenerates `.blume/` on every run — never edit it by hand.
|
|
295
|
+
:::
|
|
292
296
|
|
|
293
297
|
```md
|
|
294
|
-
:::note
|
|
298
|
+
:::note
|
|
299
|
+
Blume regenerates `.blume/` on every run — never edit it by hand.
|
|
300
|
+
:::
|
|
295
301
|
```
|
|
296
302
|
|
|
297
303
|
### Tip
|
|
298
304
|
|
|
299
305
|
A helpful shortcut or best practice that isn't required but makes life easier.
|
|
300
306
|
|
|
301
|
-
:::tip
|
|
307
|
+
:::tip
|
|
308
|
+
Set `deployment.site` so sitemaps and Open Graph images use absolute URLs.
|
|
309
|
+
:::
|
|
302
310
|
|
|
303
311
|
```md
|
|
304
|
-
:::tip
|
|
312
|
+
:::tip
|
|
313
|
+
Set `deployment.site` so sitemaps and Open Graph images use absolute URLs.
|
|
314
|
+
:::
|
|
305
315
|
```
|
|
306
316
|
|
|
307
317
|
### Success
|
|
308
318
|
|
|
309
319
|
Confirm a positive outcome or that a step completed as expected.
|
|
310
320
|
|
|
311
|
-
:::success
|
|
321
|
+
:::success
|
|
322
|
+
Your docs built successfully and are ready to deploy.
|
|
323
|
+
:::
|
|
312
324
|
|
|
313
325
|
```md
|
|
314
|
-
:::success
|
|
326
|
+
:::success
|
|
327
|
+
Your docs built successfully and are ready to deploy.
|
|
328
|
+
:::
|
|
315
329
|
```
|
|
316
330
|
|
|
317
331
|
### Warning
|
|
318
332
|
|
|
319
333
|
Flag something that needs care to avoid a mistake or surprising behavior.
|
|
320
334
|
|
|
321
|
-
:::warning[Heads up] Switching to `output: "server"` requires an adapter before you can deploy.
|
|
335
|
+
:::warning[Heads up] Switching to `output: "server"` requires an adapter before you can deploy.
|
|
336
|
+
:::
|
|
322
337
|
|
|
323
338
|
```md
|
|
324
|
-
:::warning[Heads up] Switching to `output: "server"` requires an adapter before you can deploy.
|
|
339
|
+
:::warning[Heads up] Switching to `output: "server"` requires an adapter before you can deploy.
|
|
340
|
+
:::
|
|
325
341
|
```
|
|
326
342
|
|
|
327
343
|
### Danger
|
|
328
344
|
|
|
329
345
|
Call out a destructive or breaking action that can't easily be undone.
|
|
330
346
|
|
|
331
|
-
:::danger
|
|
347
|
+
:::danger
|
|
348
|
+
`blume eject` is a one-way step — the generated Astro project becomes yours.
|
|
349
|
+
:::
|
|
332
350
|
|
|
333
351
|
```md
|
|
334
|
-
:::danger
|
|
352
|
+
:::danger
|
|
353
|
+
`blume eject` is a one-way step — the generated Astro project becomes yours.
|
|
354
|
+
:::
|
|
335
355
|
```
|
|
336
356
|
|
|
337
357
|
### Info
|
|
338
358
|
|
|
339
359
|
An informational aside; an alias-friendly default that reads as neutral.
|
|
340
360
|
|
|
341
|
-
:::info
|
|
361
|
+
:::info
|
|
362
|
+
The core theme ships no client framework JS.
|
|
363
|
+
:::
|
|
342
364
|
|
|
343
365
|
```md
|
|
344
|
-
:::info
|
|
366
|
+
:::info
|
|
367
|
+
The core theme ships no client framework JS.
|
|
368
|
+
:::
|
|
345
369
|
```
|
|
346
370
|
|
|
347
371
|
The names `caution`, `error`, `important`, and `warn` are accepted as aliases for `warning`, `danger`, `note`, and `warning` respectively.
|
|
@@ -364,7 +388,9 @@ $$
|
|
|
364
388
|
$$
|
|
365
389
|
```
|
|
366
390
|
|
|
367
|
-
:::note
|
|
391
|
+
:::note
|
|
392
|
+
Math is opt-in because `$` is common in prose and code. Enable it with `markdown: { math: true }` in `blume.config.ts`.
|
|
393
|
+
:::
|
|
368
394
|
|
|
369
395
|
## Smart punctuation
|
|
370
396
|
|
package/docs/index.mdx
CHANGED
|
@@ -27,7 +27,7 @@ Blume takes the best of both worlds. The framework is the template, so the only
|
|
|
27
27
|
|
|
28
28
|
### Fast by default
|
|
29
29
|
|
|
30
|
-
Blume builds on Astro and Vite and renders static HTML by default — fast, cacheable, and cheap to host. The core theme
|
|
30
|
+
Blume builds on Astro and Vite and renders static HTML by default — fast, cacheable, and cheap to host. The core theme ships no client framework JS so pages score well on Core Web Vitals out of the box. Dev startup and hot reload feel Vite-native, and you opt into server features only when you need them.
|
|
31
31
|
|
|
32
32
|
### AI-ready out of the box
|
|
33
33
|
|
|
@@ -49,7 +49,7 @@ Your [`blume.config.ts`](/docs/configuration) and every [`meta.ts`](/docs/conten
|
|
|
49
49
|
- **Navigation** — inferred from files, refined with `meta.ts` or config.
|
|
50
50
|
- **SEO** — metadata, Open Graph images, RSS feeds, and JSON-LD, [built in](/docs/configuration/seo).
|
|
51
51
|
- **Customization** — component overrides, React islands, custom pages, theme tokens, and a source-component registry via `blume add`.
|
|
52
|
-
- **Migration** — `blume migrate mintlify | starlight | nextra | fumadocs
|
|
52
|
+
- **Migration** — [`blume migrate mintlify | starlight | nextra | fumadocs`](/docs/advanced/migrate), or run `blume dev` on a Mintlify project as-is with [bridge mode](/docs/advanced/bridge).
|
|
53
53
|
- **Eject** — `blume eject` produces a standalone Astro project that still uses the `blume` package.
|
|
54
54
|
|
|
55
55
|
## How it works
|
package/docs/reference/cli.mdx
CHANGED
|
@@ -16,7 +16,7 @@ blume <command> [options]
|
|
|
16
16
|
| `blume build` | Build the static (or server) site. |
|
|
17
17
|
| `blume preview` | Preview the last build. |
|
|
18
18
|
| `blume add <item>` | Install a source component from the registry. |
|
|
19
|
-
| `blume migrate <tool>` | Migrate from Mintlify, Starlight, Nextra, or Fumadocs. |
|
|
19
|
+
| [`blume migrate <tool>`](/docs/advanced/migrate) | Migrate from Mintlify, Starlight, Nextra, or Fumadocs. |
|
|
20
20
|
| `blume sync` | Re-fetch remote content sources and regenerate. |
|
|
21
21
|
| `blume eject` | Promote the runtime into a standalone Astro app. |
|
|
22
22
|
| `blume check` | Type-check the site with `astro check`. |
|
|
@@ -37,16 +37,44 @@ blume <command> [options]
|
|
|
37
37
|
- `blume build --output static|server --adapter vercel|node|netlify|cloudflare --base /docs` — override the deployment output, adapter, and base path from `blume.config.ts`.
|
|
38
38
|
- `blume build --analyze` — print the client JavaScript bundle sizes (largest first) after the build.
|
|
39
39
|
- `blume build --budget-js <kb> --budget-css <kb>` — fail the build when total client JavaScript/CSS exceeds the budget, turning a performance target into a CI gate.
|
|
40
|
+
- `blume build --isolated` — build into a throwaway `.blume-verify/` runtime (and its own `dist/`) instead of `.blume/`, so a running `blume dev` server and your real `dist/` are left untouched. See [Verifying while the dev server runs](#verifying-while-the-dev-server-runs).
|
|
40
41
|
- `blume preview --host --port <n>` — bind the preview server.
|
|
41
42
|
- `blume sync --force` — re-fetch remote sources, dropping the cached snapshot first.
|
|
42
43
|
- `blume add <item> --force` — overwrite files that already exist.
|
|
43
44
|
- `blume check --preview` — include drafts and unpublished CMS content when checking.
|
|
44
45
|
- `blume check --strict` — fail on content diagnostics as well as type errors.
|
|
46
|
+
- `blume check --isolated` — type-check in a throwaway `.blume-verify/` runtime so a running `blume dev` server is left untouched. See [Verifying while the dev server runs](#verifying-while-the-dev-server-runs).
|
|
45
47
|
- `blume eject --yes` — skip the confirmation prompt.
|
|
46
48
|
- `blume validate --external` — also check external links over the network.
|
|
47
49
|
- `blume validate --strict` — exit non-zero on warnings too.
|
|
48
50
|
- `blume validate --json` / `blume doctor --json` — emit diagnostics as JSON on stdout (with `code`, `severity`, `file`, `line`/`column`, and `docsUrl`) for CI and editor integrations.
|
|
49
51
|
|
|
52
|
+
## Verifying while the dev server runs
|
|
53
|
+
|
|
54
|
+
`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:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
A `blume dev` server is running against .blume; building would corrupt it.
|
|
58
|
+
Stop the dev server, or re-run with --isolated to build/verify against
|
|
59
|
+
.blume-verify without touching it.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
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:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# In a second terminal, while `blume dev` is running:
|
|
66
|
+
blume check --isolated # fast: type-check the .astro/config changes
|
|
67
|
+
blume build --isolated # thorough: full production render into .blume-verify/dist
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`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
|
+
|
|
72
|
+
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:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
export BLUME_RUNTIME_DIR=.blume-verify
|
|
76
|
+
```
|
|
77
|
+
|
|
50
78
|
## Type-checking
|
|
51
79
|
|
|
52
80
|
`blume check` runs [`astro check`](https://docs.astro.build/en/reference/cli-reference/#astro-check) over your project. It regenerates the `.blume` runtime, syncs Astro's content types, then reports any TypeScript errors — in your `blume.config.ts`, in custom `.astro` pages, and in the components they import. It exits non-zero when there are errors, so it works as a `typecheck` step in CI:
|
|
@@ -18,6 +18,11 @@ Every page accepts the following frontmatter. All fields are optional.
|
|
|
18
18
|
type: "string",
|
|
19
19
|
description: "Publish date for blog/changelog feeds (ISO or YAML date).",
|
|
20
20
|
},
|
|
21
|
+
authors: {
|
|
22
|
+
type: "string | string[] | object[]",
|
|
23
|
+
description:
|
|
24
|
+
"Post author(s) for blog/changelog content — a name, or objects with a name plus optional avatar/url and any extra fields. Preserved as-is.",
|
|
25
|
+
},
|
|
21
26
|
slug: { type: "string", description: "Override the generated slug." },
|
|
22
27
|
draft: {
|
|
23
28
|
type: "boolean",
|