blume 0.2.0 → 0.4.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/dist/cli/index.js +2429 -792
- package/dist/cli/index.js.map +63 -44
- package/dist/types/core/data.d.ts +16 -0
- package/dist/types/core/define-components.d.ts +9 -2
- package/dist/types/core/diagnostics.d.ts +5 -0
- package/dist/types/core/schema.d.ts +313 -778
- package/dist/types/core/types.d.ts +2 -2
- package/dist/types/migrate/mintlify/assets.d.ts +8 -0
- package/docs/01-quickstart.mdx +5 -16
- package/docs/02-deployment.mdx +26 -40
- package/docs/advanced/api-reference.mdx +10 -37
- package/docs/advanced/blog.mdx +9 -25
- package/docs/advanced/changelog.mdx +10 -33
- package/docs/advanced/custom-pages.mdx +66 -61
- package/docs/configuration/ai.mdx +47 -91
- package/docs/configuration/analytics.mdx +20 -38
- package/docs/configuration/customization.mdx +92 -27
- package/docs/configuration/export.mdx +9 -34
- package/docs/configuration/index.mdx +78 -85
- package/docs/configuration/search.mdx +17 -54
- package/docs/configuration/seo.mdx +18 -44
- package/docs/configuration/theming.mdx +20 -42
- package/docs/content/components.mdx +42 -101
- package/docs/content/i18n.mdx +21 -72
- package/docs/content/index.mdx +18 -48
- package/docs/content/islands.mdx +79 -33
- package/docs/content/meta.mdx +23 -50
- package/docs/content/navigation.mdx +42 -56
- package/docs/content/sources.mdx +20 -83
- package/docs/content/syntax.mdx +37 -105
- package/docs/index.mdx +13 -51
- package/docs/reference/cli.mdx +49 -18
- package/docs/reference/frontmatter.mdx +2 -5
- package/package.json +3 -1
- package/src/ai/ask-context.ts +131 -0
- package/src/ai/ask-data.ts +25 -0
- package/src/astro/component-slots.ts +165 -0
- package/src/astro/generate.ts +132 -13
- package/src/astro/integration.ts +85 -3
- package/src/astro/islands.ts +6 -2
- package/src/astro/markdown-negotiation.ts +17 -3
- package/src/astro/pages.ts +11 -13
- package/src/astro/static-assets.ts +117 -0
- package/src/astro/templates.ts +120 -50
- package/src/blume-modules.d.ts +25 -0
- package/src/cli/args.ts +23 -0
- package/src/cli/commands/build.ts +209 -1
- package/src/cli/commands/check.ts +62 -0
- package/src/cli/commands/dev.ts +32 -3
- package/src/cli/commands/doctor.ts +32 -6
- package/src/cli/commands/eject.ts +3 -1
- package/src/cli/commands/init.ts +184 -16
- package/src/cli/commands/preview.ts +2 -1
- package/src/cli/commands/validate.ts +27 -2
- package/src/cli/dev-lock.ts +84 -0
- package/src/cli/index.ts +15 -0
- package/src/cli/internal-error.ts +63 -0
- package/src/cli/log.ts +41 -1
- package/src/cli/prepare.ts +17 -3
- package/src/cli/required-secrets.ts +44 -0
- package/src/components/BlumePage.astro +109 -0
- package/src/components/content/YouTube.astro +35 -0
- package/src/components/content/youtube.ts +46 -0
- package/src/components/index.ts +3 -3
- package/src/components/islands/ask-ai.tsx +29 -15
- package/src/components/islands/hooks.ts +188 -0
- package/src/components/layout/Empty.astro +6 -0
- package/src/components/layout/Header.astro +24 -39
- package/src/components/layout/Logo.astro +50 -0
- package/src/components/layout/NavSelector.astro +75 -0
- package/src/components/layout/PageLayout.astro +38 -2
- package/src/components/layout/RootLayout.astro +70 -4
- package/src/components/layout/hydration-hint.ts +30 -0
- package/src/components/layout/overrides.ts +6 -4
- package/src/components/props.ts +71 -0
- package/src/core/assets.ts +31 -0
- package/src/core/bridge.ts +10 -0
- package/src/core/builtin-tags.ts +40 -0
- package/src/core/component-diagnostics.ts +44 -0
- package/src/core/component-overrides.ts +478 -0
- package/src/core/config.ts +8 -0
- package/src/core/data.ts +14 -0
- package/src/core/define-components.ts +9 -2
- package/src/core/diagnostics.ts +95 -1
- package/src/core/gitignore.ts +30 -0
- package/src/core/graph.ts +7 -0
- package/src/core/links.ts +60 -19
- package/src/core/nav-diagnostics.ts +205 -0
- package/src/core/project-graph.ts +40 -1
- package/src/core/schema.ts +35 -96
- package/src/core/sources/mdx-remote.ts +54 -8
- package/src/core/sources/normalize.ts +57 -1
- package/src/core/sources/notion.ts +49 -5
- package/src/core/sources/sanity.ts +5 -1
- package/src/core/types.ts +2 -2
- package/src/deploy/redirects.ts +43 -0
- package/src/deploy/rss.ts +1 -8
- package/src/deploy/sitemap.ts +20 -1
- package/src/deploy/xml.ts +8 -0
- package/src/markdown/directives.ts +15 -7
- package/src/markdown/package-commands.ts +26 -4
- package/src/migrate/fumadocs/content.ts +14 -1
- package/src/migrate/fumadocs/groups.ts +7 -0
- package/src/migrate/fumadocs/index.ts +5 -2
- package/src/migrate/mintlify/assets.ts +46 -0
- package/src/migrate/mintlify/config.ts +1 -176
- package/src/migrate/mintlify/index.ts +53 -45
- package/src/migrate/shared.ts +12 -27
- package/src/migrate/starlight/config.ts +0 -4
- package/src/og/card.ts +175 -38
- package/src/registry/eject.ts +52 -12
- package/src/registry/registry.ts +172 -0
- package/src/registry/rewrite-imports.ts +31 -19
- package/src/runtime/index.ts +61 -0
- package/src/search/documents.ts +23 -5
- package/src/search/sync/algolia.ts +5 -1
- package/src/search/sync/typesense.ts +24 -16
- package/src/theme/palette.ts +26 -7
- package/src/vite-env.d.ts +14 -0
|
@@ -5,9 +5,7 @@ description: Override components, add interactive islands, mount custom pages, i
|
|
|
5
5
|
|
|
6
6
|
## Component overrides
|
|
7
7
|
|
|
8
|
-
Add a `components.ts` (or `components.tsx`) to your project root and export
|
|
9
|
-
`defineComponents`. The `mdx` map either **replaces** a built-in component or
|
|
10
|
-
**adds** a new one — available in every `.mdx` page with no import.
|
|
8
|
+
Add a `components.ts` (or `components.tsx`) to your project root and export `defineComponents`. The `mdx` map either **replaces** a built-in component or **adds** a new one — available in every `.mdx` page with no import.
|
|
11
9
|
|
|
12
10
|
```ts components.ts lineNumbers
|
|
13
11
|
import { defineComponents } from "blume";
|
|
@@ -22,14 +20,92 @@ export default defineComponents({
|
|
|
22
20
|
});
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
Keys are the names you write in MDX (`<Callout>`, `<Pricing>`). Use the `.tsx`
|
|
26
|
-
|
|
23
|
+
Keys are the names you write in MDX (`<Callout>`, `<Pricing>`). Use the `.tsx` filename when you import React components.
|
|
24
|
+
|
|
25
|
+
### Reference form
|
|
26
|
+
|
|
27
|
+
Every override — in `mdx`, `layout`, or `islands` — accepts three forms:
|
|
28
|
+
|
|
29
|
+
```ts components.ts
|
|
30
|
+
import { defineComponents } from "blume";
|
|
31
|
+
import Callout from "./components/Callout.astro";
|
|
32
|
+
|
|
33
|
+
export default defineComponents({
|
|
34
|
+
mdx: {
|
|
35
|
+
Callout, // 1. an imported component
|
|
36
|
+
Note: "./components/Note.astro", // 2. a path string (resolved from the project root)
|
|
37
|
+
Chart: { component: "./components/Chart.tsx", client: "load" }, // 3. a descriptor
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The **descriptor** form adds a hydration mode so an interactive React/Vue/Svelte component ships its JavaScript and comes alive on the client. Without a `client` mode a framework component renders as static HTML — Blume prints a build warning when it spots one, since that's usually a mistake.
|
|
43
|
+
|
|
44
|
+
| `client` | Hydrates |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| `"load"` | Immediately on page load |
|
|
47
|
+
| `"idle"` | When the main thread is idle |
|
|
48
|
+
| `"visible"` | When scrolled into view |
|
|
49
|
+
| `"media"` | When a `media` query matches (add `media: "(min-width: 40rem)"`) |
|
|
50
|
+
| `"only"` | Client only, never server-rendered |
|
|
51
|
+
|
|
52
|
+
For interactive components you use across many pages, the [`islands` group](/docs/content/islands#registering-islands-in-componentsts) is a shorthand for the descriptor form with `client: "visible"`.
|
|
53
|
+
|
|
54
|
+
### Typing an override
|
|
55
|
+
|
|
56
|
+
When you replace a built-in, import its prop type from `blume/components` so your component matches the contract — the types are derived from the components themselves, so they never drift:
|
|
57
|
+
|
|
58
|
+
```tsx components/Callout.tsx
|
|
59
|
+
import type { CalloutProps } from "blume/components";
|
|
60
|
+
|
|
61
|
+
export default function Callout(props: CalloutProps) {
|
|
62
|
+
// …your own callout, same props as the built-in
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Prop types are exported for the content components (`CalloutProps`, `CardProps`, `TabsProps`, `StepsProps`, `BadgeProps`, and more).
|
|
67
|
+
|
|
68
|
+
## Layout slots
|
|
69
|
+
|
|
70
|
+
The `layout` map replaces a piece of Blume's chrome with your own component. Each override receives the same props as the built-in it replaces, so you can wrap the default or start from scratch.
|
|
71
|
+
|
|
72
|
+
```ts components.ts
|
|
73
|
+
import { defineComponents } from "blume";
|
|
74
|
+
import Footer from "./components/Footer.astro";
|
|
75
|
+
import Logo from "./components/Logo.astro";
|
|
76
|
+
|
|
77
|
+
export default defineComponents({
|
|
78
|
+
layout: {
|
|
79
|
+
Logo, // brand mark + title in the header
|
|
80
|
+
Footer, // site-wide footer (no built-in — renders only when set)
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Wired slots:
|
|
86
|
+
|
|
87
|
+
| Slot | Replaces | Props |
|
|
88
|
+
| --- | --- | --- |
|
|
89
|
+
| `Layout` | The entire page shell (`RootLayout`) | Everything the built-in layout receives, plus the `layout` map |
|
|
90
|
+
| `Header` | The top navigation bar | `site`, `logo`, `navigation`, `route`, `searchEnabled`, … |
|
|
91
|
+
| `Logo` | The brand link (mark + title) in the header | `site`, `logo` |
|
|
92
|
+
| `Search` | The header search trigger + modal | `navigation`, `strings`, `locale`, `askEnabled` |
|
|
93
|
+
| `Sidebar` | The primary navigation tree | `items`, `currentRoute` |
|
|
94
|
+
| `MobileNav` | The nav inside the mobile drawer (defaults to `Sidebar`) | `items`, `currentRoute` |
|
|
95
|
+
| `Breadcrumbs` | The breadcrumb trail | `crumbs` |
|
|
96
|
+
| `TableOfContents` | The on-this-page outline | `headings`, `title`, `variant` |
|
|
97
|
+
| `Pagination` | The prev/next footer links | `prev`, `next`, `strings` |
|
|
98
|
+
| `PageHeader` | An injection point above the article (no built-in) | `page`, `headings`, `route` |
|
|
99
|
+
| `PageFooter` | An injection point below the article (no built-in) | `page`, `headings`, `route` |
|
|
100
|
+
| `Footer` | A site-wide footer after the content grid (no built-in) | `site`, `navigation`, `ui` |
|
|
101
|
+
|
|
102
|
+
`PageHeader`, `PageFooter`, and `Footer` have no built-in component — they render nothing until you set them, which makes them handy injection points for a promo banner, a "last updated" note, or a marketing footer.
|
|
103
|
+
|
|
104
|
+
Layout slots accept the same [three reference forms](#reference-form) as MDX overrides, so a slot can be a path string or a hydrated descriptor (`{ component, client }`) when you want an interactive header or footer.
|
|
27
105
|
|
|
28
106
|
## Interactive islands
|
|
29
107
|
|
|
30
|
-
For interactive UI (React, Vue, or Svelte), drop a component into an `islands/`
|
|
31
|
-
folder and use it in any MDX page — Blume hydrates it for you, no wrapper or
|
|
32
|
-
registration needed:
|
|
108
|
+
For interactive UI (React, Vue, or Svelte), drop a component into an `islands/` folder and use it in any MDX page — Blume hydrates it for you, no wrapper or registration needed:
|
|
33
109
|
|
|
34
110
|
```tsx islands/Counter.tsx lineNumbers
|
|
35
111
|
import { useState } from "react";
|
|
@@ -44,48 +120,37 @@ export default function Counter() {
|
|
|
44
120
|
Use it anywhere: <Counter />
|
|
45
121
|
```
|
|
46
122
|
|
|
47
|
-
See [Islands](/docs/content/islands) for hydration strategies and framework
|
|
48
|
-
setup.
|
|
123
|
+
See [Islands](/docs/content/islands) for hydration strategies and framework setup.
|
|
49
124
|
|
|
50
125
|
## Custom pages
|
|
51
126
|
|
|
52
|
-
Add `.astro` files under your `pages/` folder to mount fully custom routes
|
|
53
|
-
alongside your docs — a landing page, a pricing page, or a hand-built index. They
|
|
54
|
-
keep their location, so relative imports and `getStaticPaths` work as usual, and
|
|
55
|
-
they can read your config, navigation, and routes from the `blume:data` module.
|
|
127
|
+
Add `.astro` files under your `pages/` folder to mount fully custom routes alongside your docs — a landing page, a pricing page, or a hand-built index. They keep their location, so relative imports and `getStaticPaths` work as usual, and they can read your config, navigation, and routes from the `blume:data` module.
|
|
56
128
|
|
|
57
129
|
See [Custom Pages](/docs/advanced/custom-pages) for the full guide.
|
|
58
130
|
|
|
59
131
|
## Registry
|
|
60
132
|
|
|
61
|
-
`blume add` copies a Blume-maintained component into your project as **source** —
|
|
62
|
-
you own it and can edit it freely. Run it with no arguments to list what's
|
|
63
|
-
available:
|
|
133
|
+
`blume add` copies a Blume-maintained component into your project as **source** — you own it and can edit it freely. Run it with no arguments to list what's available:
|
|
64
134
|
|
|
65
135
|
```bash
|
|
66
136
|
blume add
|
|
67
137
|
```
|
|
68
138
|
|
|
69
|
-
Install a
|
|
70
|
-
header, sidebar, breadcrumbs, table of contents, or pagination:
|
|
139
|
+
Install a layout slot (header, sidebar, breadcrumbs, table of contents, pagination, or feedback) or any content component (callout, card, tabs, steps, accordion, and more):
|
|
71
140
|
|
|
72
141
|
```bash
|
|
142
|
+
blume add callout
|
|
73
143
|
blume add pagination
|
|
74
144
|
```
|
|
75
145
|
|
|
76
|
-
The copy imports the rest of the framework from `blume/*`, so it renders
|
|
77
|
-
exactly like the built-in until you change it. `blume add` prints the
|
|
78
|
-
`defineComponents` snippet to register it under the matching layout slot.
|
|
146
|
+
The copy imports the rest of the framework from `blume/*`, so it renders exactly like the built-in until you change it. `blume add` prints the `defineComponents` snippet to register it — content components under `mdx`, layout pieces under `layout`.
|
|
79
147
|
|
|
80
148
|
## Eject
|
|
81
149
|
|
|
82
|
-
When you want full control, eject the generated runtime into a standalone Astro
|
|
83
|
-
project:
|
|
150
|
+
When you want full control, eject the generated runtime into a standalone Astro project:
|
|
84
151
|
|
|
85
152
|
```bash
|
|
86
153
|
blume eject --yes
|
|
87
154
|
```
|
|
88
155
|
|
|
89
|
-
Eject is a one-way step: the hidden `.blume/` runtime becomes a normal Astro app
|
|
90
|
-
you own and can modify directly. The `blume` package stays importable, so you
|
|
91
|
-
keep its components, theme, and Markdown processors.
|
|
156
|
+
Eject is a one-way step: the hidden `.blume/` runtime becomes a normal Astro app you own and can modify directly. The `blume` package stays importable, so you keep its components, theme, and Markdown processors.
|
|
@@ -3,11 +3,7 @@ title: Export
|
|
|
3
3
|
description: Let readers download any page as a PDF or EPUB.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Blume can add an **Export** action to the [page
|
|
7
|
-
actions](/docs/content/navigation#page-actions) beneath the table of contents,
|
|
8
|
-
letting readers save the page they're on as a **PDF** or an **EPUB**. It's off by
|
|
9
|
-
default and entirely client-side — no server, and [static](/docs/deployment)
|
|
10
|
-
builds stay static.
|
|
6
|
+
Blume can add an **Export** action to the [page actions](/docs/content/navigation#page-actions) beneath the table of contents, letting readers save the page they're on as a **PDF** or an **EPUB**. It's off by default and entirely client-side — no server, and [static](/docs/deployment) builds stay static.
|
|
11
7
|
|
|
12
8
|
## Enable it
|
|
13
9
|
|
|
@@ -26,45 +22,24 @@ export: {
|
|
|
26
22
|
},
|
|
27
23
|
```
|
|
28
24
|
|
|
29
|
-
Any format you omit (or set to `false`) is left out of the menu. With both off —
|
|
30
|
-
the default — the **Export** action doesn't appear at all.
|
|
25
|
+
Any format you omit (or set to `false`) is left out of the menu. With both off — the default — the **Export** action doesn't appear at all.
|
|
31
26
|
|
|
32
27
|
## PDF
|
|
33
28
|
|
|
34
|
-
**Export to PDF** opens your browser's print dialog with a print stylesheet that
|
|
35
|
-
strips the site chrome — header, sidebars, navigation — down to just the article.
|
|
36
|
-
Choose **Save as PDF** to finish.
|
|
29
|
+
**Export to PDF** opens your browser's print dialog with a print stylesheet that strips the site chrome — header, sidebars, navigation — down to just the article. Choose **Save as PDF** to finish.
|
|
37
30
|
|
|
38
|
-
Because it prints the live, fully-styled page, the result keeps crisp, selectable
|
|
39
|
-
text, real fonts, and syntax-highlighted code. It needs no dependencies and works
|
|
40
|
-
the same in dev, in production, and on static hosts.
|
|
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.
|
|
41
32
|
|
|
42
|
-
:::note
|
|
43
|
-
PDF export goes through the browser's native print dialog, so the exact "Save as
|
|
44
|
-
PDF" wording and options depend on the browser. Enable **Background graphics** in
|
|
45
|
-
the dialog to keep code-block and callout backgrounds.
|
|
46
|
-
:::
|
|
33
|
+
:::note 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. :::
|
|
47
34
|
|
|
48
35
|
## EPUB
|
|
49
36
|
|
|
50
|
-
**Export to EPUB** generates a self-contained `.epub` of the current page in the
|
|
51
|
-
browser and downloads it — ready for Apple Books, Calibre, or any e-reader. The
|
|
52
|
-
generator is loaded only when a reader clicks Export, so it never weighs down the
|
|
53
|
-
rest of your site.
|
|
37
|
+
**Export to EPUB** generates a self-contained `.epub` of the current page in the browser and downloads it — ready for Apple Books, Calibre, or any e-reader. The generator is loaded only when a reader clicks Export, so it never weighs down the rest of your site.
|
|
54
38
|
|
|
55
|
-
To keep the file readable on a device with no stylesheet or JavaScript of its
|
|
56
|
-
own, Blume rewrites the page into clean, standalone HTML: syntax-highlighted code
|
|
57
|
-
becomes plain monospace, decorative icons and copy buttons are dropped, and a
|
|
58
|
-
built-in e-reader stylesheet handles spacing, code blocks, and tables.
|
|
39
|
+
To keep the file readable on a device with no stylesheet or JavaScript of its own, Blume rewrites the page into clean, standalone HTML: syntax-highlighted code becomes plain monospace, decorative icons and copy buttons are dropped, and a built-in e-reader stylesheet handles spacing, code blocks, and tables.
|
|
59
40
|
|
|
60
41
|
## What gets exported
|
|
61
42
|
|
|
62
|
-
Both formats export the **single page** a reader is viewing — not the whole site
|
|
63
|
-
— which matches where the action lives, beneath that page's table of contents.
|
|
43
|
+
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.
|
|
64
44
|
|
|
65
|
-
:::note
|
|
66
|
-
In an EPUB there's no JavaScript to switch tabs, so tabbed content — like
|
|
67
|
-
[package-install](/docs/content/syntax) blocks and code groups — is expanded to
|
|
68
|
-
show every panel at once. Client-rendered embeds such as Mermaid diagrams aren't
|
|
69
|
-
included.
|
|
70
|
-
:::
|
|
45
|
+
:::note 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. :::
|
|
@@ -5,9 +5,7 @@ sidebar:
|
|
|
5
5
|
label: blume.config.ts
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Blume reads `blume.config.ts` from your project root. Wrap your config in
|
|
9
|
-
`defineConfig` for autocomplete and type-checking — every field is optional, with
|
|
10
|
-
a sensible default.
|
|
8
|
+
Blume reads `blume.config.ts` from your project root. Wrap your config in `defineConfig` for autocomplete and type-checking — every field is optional, with a sensible default.
|
|
11
9
|
|
|
12
10
|
```ts blume.config.ts lineNumbers
|
|
13
11
|
import { defineConfig } from "blume";
|
|
@@ -20,8 +18,7 @@ export default defineConfig({
|
|
|
20
18
|
|
|
21
19
|
## A complete example
|
|
22
20
|
|
|
23
|
-
A broader example touching the most common options (see each feature's guide for
|
|
24
|
-
the rest):
|
|
21
|
+
A broader example touching the most common options (see each feature's guide for the rest):
|
|
25
22
|
|
|
26
23
|
```ts blume.config.ts lineNumbers
|
|
27
24
|
import { defineConfig } from "blume";
|
|
@@ -90,25 +87,22 @@ export default defineConfig({
|
|
|
90
87
|
|
|
91
88
|
## Site
|
|
92
89
|
|
|
93
|
-
| Option
|
|
94
|
-
|
|
|
95
|
-
| `title`
|
|
96
|
-
| `description` | —
|
|
97
|
-
| `logo`
|
|
98
|
-
| `banner`
|
|
90
|
+
| Option | Default | Description |
|
|
91
|
+
| --- | --- | --- |
|
|
92
|
+
| `title` | `"Documentation"` | Site name — shown in the header, page titles, OG cards. |
|
|
93
|
+
| `description` | — | Default meta description, used for SEO and OG. |
|
|
94
|
+
| `logo` | — | Brand logo shown beside the title in the header. |
|
|
95
|
+
| `banner` | — | Site-wide announcement bar above the header. |
|
|
99
96
|
|
|
100
97
|
### Logo
|
|
101
98
|
|
|
102
|
-
Point `logo` at an SVG and Blume inlines it, so a `currentColor` logo follows
|
|
103
|
-
the light and dark theme automatically:
|
|
99
|
+
Point `logo` at an SVG and Blume inlines it, so a `currentColor` logo follows the light and dark theme automatically:
|
|
104
100
|
|
|
105
101
|
```ts blume.config.ts
|
|
106
102
|
logo: "/logo.svg",
|
|
107
103
|
```
|
|
108
104
|
|
|
109
|
-
The SVG can live at your project root or in `public/`. For raster images — or
|
|
110
|
-
separate light and dark artwork — use the object form (these must live in
|
|
111
|
-
`public/`):
|
|
105
|
+
The SVG can live at your project root or in `public/`. For raster images — or separate light and dark artwork — use the object form (these must live in `public/`):
|
|
112
106
|
|
|
113
107
|
```ts blume.config.ts lineNumbers
|
|
114
108
|
logo: {
|
|
@@ -123,9 +117,7 @@ logo: {
|
|
|
123
117
|
|
|
124
118
|
### Favicon
|
|
125
119
|
|
|
126
|
-
There's no favicon option — Blume auto-detects one by filename, the way Next.js
|
|
127
|
-
does. Drop an `icon` or `favicon` file (`.svg`, `.png`, or `.ico`) in your
|
|
128
|
-
project root or `public/` directory and it becomes the browser tab icon:
|
|
120
|
+
There's no favicon option — Blume auto-detects one by filename, the way Next.js does. Drop an `icon` or `favicon` file (`.svg`, `.png`, or `.ico`) in your project root or `public/` directory and it becomes the browser tab icon:
|
|
129
121
|
|
|
130
122
|
```
|
|
131
123
|
my-docs/
|
|
@@ -134,17 +126,11 @@ my-docs/
|
|
|
134
126
|
└─ docs/
|
|
135
127
|
```
|
|
136
128
|
|
|
137
|
-
SVG wins over PNG over ICO when several are present, and a file in `public/` is
|
|
138
|
-
preferred over one at the root. If Blume finds no icon, it falls back to its own
|
|
139
|
-
mark.
|
|
129
|
+
SVG wins over PNG over ICO when several are present, and a file in `public/` is preferred over one at the root. If Blume finds no icon, it falls back to its own mark.
|
|
140
130
|
|
|
141
131
|
### Apple touch icon
|
|
142
132
|
|
|
143
|
-
The icon iOS uses when someone adds your site to their home screen is detected
|
|
144
|
-
the same way. Drop an `apple-icon` file (`.png`, `.jpg`, or `.jpeg`) — or an
|
|
145
|
-
`apple-touch-icon.png`, the name most favicon generators emit — in your project
|
|
146
|
-
root or `public/` directory and Blume wires up `<link rel="apple-touch-icon">`
|
|
147
|
-
for you. There's no default; if no file is found, no tag is emitted.
|
|
133
|
+
The icon iOS uses when someone adds your site to their home screen is detected the same way. Drop an `apple-icon` file (`.png`, `.jpg`, or `.jpeg`) — or an `apple-touch-icon.png`, the name most favicon generators emit — in your project root or `public/` directory and Blume wires up `<link rel="apple-touch-icon">` for you. There's no default; if no file is found, no tag is emitted.
|
|
148
134
|
|
|
149
135
|
```
|
|
150
136
|
my-docs/
|
|
@@ -153,14 +139,11 @@ my-docs/
|
|
|
153
139
|
└─ docs/
|
|
154
140
|
```
|
|
155
141
|
|
|
156
|
-
Put the file in `public/` rather than the project root: iOS ignores the inlined
|
|
157
|
-
data URI Blume uses for a root-level icon, so only a `public/` file (served at
|
|
158
|
-
`/apple-icon.png`) reliably reaches the home screen.
|
|
142
|
+
Put the file in `public/` rather than the project root: iOS ignores the inlined data URI Blume uses for a root-level icon, so only a `public/` file (served at `/apple-icon.png`) reliably reaches the home screen.
|
|
159
143
|
|
|
160
144
|
### Banner
|
|
161
145
|
|
|
162
|
-
Show a site-wide announcement bar above the header. Pass a string, or an object
|
|
163
|
-
with a link and a dismiss button:
|
|
146
|
+
Show a site-wide announcement bar above the header. Pass a string, or an object with a link and a dismiss button:
|
|
164
147
|
|
|
165
148
|
```ts blume.config.ts
|
|
166
149
|
banner: "Docs are in beta — expect changes.",
|
|
@@ -175,15 +158,11 @@ banner: {
|
|
|
175
158
|
},
|
|
176
159
|
```
|
|
177
160
|
|
|
178
|
-
When `dismissible` is on, the bar shows a close button and stays hidden for that
|
|
179
|
-
visitor afterward. The dismissal key defaults to the content text, so editing
|
|
180
|
-
the message brings the banner back; set a stable `id` to keep it dismissed
|
|
181
|
-
across edits.
|
|
161
|
+
When `dismissible` is on, the bar shows a close button and stays hidden for that visitor afterward. The dismissal key defaults to the content text, so editing the message brings the banner back; set a stable `id` to keep it dismissed across edits.
|
|
182
162
|
|
|
183
163
|
## Content
|
|
184
164
|
|
|
185
|
-
Where your content lives and how Blume discovers it. See [Pages](/docs/content) for
|
|
186
|
-
how files become routes.
|
|
165
|
+
Where your content lives and how Blume discovers it. See [Pages](/docs/content) for how files become routes.
|
|
187
166
|
|
|
188
167
|
```ts blume.config.ts lineNumbers
|
|
189
168
|
content: {
|
|
@@ -191,35 +170,41 @@ content: {
|
|
|
191
170
|
}
|
|
192
171
|
```
|
|
193
172
|
|
|
194
|
-
| Option
|
|
195
|
-
|
|
|
196
|
-
| `root`
|
|
197
|
-
| `include`
|
|
198
|
-
| `exclude`
|
|
199
|
-
| `pages`
|
|
200
|
-
| `defaultType` | `"doc"`
|
|
173
|
+
| Option | Default | Description |
|
|
174
|
+
| --- | --- | --- |
|
|
175
|
+
| `root` | `"docs"` | Folder Blume scans for content. |
|
|
176
|
+
| `include` | `["**/*.{md,mdx}"]` | Globs that match content files. |
|
|
177
|
+
| `exclude` | `["**/_*", "**/.*"]` | Globs to ignore (underscore- and dot-files). |
|
|
178
|
+
| `pages` | `"pages"` | Folder for custom `.astro` pages. |
|
|
179
|
+
| `defaultType` | `"doc"` | Page `type` used when frontmatter omits it. |
|
|
180
|
+
| `assets` | `[]` | Extra top-level directories served at the site root, alongside `public/`. |
|
|
181
|
+
|
|
182
|
+
Assets normally live in `public/` — a file at `public/logo.png` is served at `/logo.png`. Use `assets` to serve additional root-level folders in place instead of moving them under `public/`. Each entry is a directory relative to your project root, served at the matching URL and copied into `dist/` on build:
|
|
183
|
+
|
|
184
|
+
```ts blume.config.ts
|
|
185
|
+
content: {
|
|
186
|
+
assets: ["images"], // /images/create.png → images/create.png
|
|
187
|
+
}
|
|
188
|
+
```
|
|
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.
|
|
201
191
|
|
|
202
192
|
## Last modified
|
|
203
193
|
|
|
204
|
-
Show a "Last updated on …" line at the bottom of each page. Off by default; set
|
|
205
|
-
`lastModified` to `true` to derive each page's date from its git history:
|
|
194
|
+
Show a "Last updated on …" line at the bottom of each page. Off by default; set `lastModified` to `true` to derive each page's date from its git history:
|
|
206
195
|
|
|
207
196
|
```ts blume.config.ts
|
|
208
197
|
lastModified: true,
|
|
209
198
|
```
|
|
210
199
|
|
|
211
|
-
| Value
|
|
212
|
-
|
|
|
213
|
-
| `false`
|
|
214
|
-
| `true`
|
|
215
|
-
| `{ type: "git" }`
|
|
200
|
+
| Value | Description |
|
|
201
|
+
| --- | --- |
|
|
202
|
+
| `false` | Disabled (default). |
|
|
203
|
+
| `true` | Read the date from git history (commit dates). |
|
|
204
|
+
| `{ type: "git" }` | Same as `true`, written explicitly. |
|
|
216
205
|
| `{ type: "frontmatter" }` | Never run git — use only the `lastModified` frontmatter field. |
|
|
217
206
|
|
|
218
|
-
The git source reads the most recent commit that touched each file, so it works
|
|
219
|
-
in any git repository — including monorepos — and needs the repo's history at
|
|
220
|
-
build time (avoid a shallow `--depth 1` checkout in CI). A page's own
|
|
221
|
-
`lastModified` frontmatter always wins, which is handy for pinning a date or for
|
|
222
|
-
files that aren't committed yet:
|
|
207
|
+
The git source reads the most recent commit that touched each file, so it works in any git repository — including monorepos — and needs the repo's history at build time (avoid a shallow `--depth 1` checkout in CI). A page's own `lastModified` frontmatter always wins, which is handy for pinning a date or for files that aren't committed yet:
|
|
223
208
|
|
|
224
209
|
```mdx page.mdx
|
|
225
210
|
---
|
|
@@ -228,14 +213,11 @@ lastModified: 2026-06-20
|
|
|
228
213
|
---
|
|
229
214
|
```
|
|
230
215
|
|
|
231
|
-
When enabled, the date is also emitted as schema.org `dateModified` in the
|
|
232
|
-
page's structured data.
|
|
216
|
+
When enabled, the date is also emitted as schema.org `dateModified` in the page's structured data.
|
|
233
217
|
|
|
234
218
|
## SEO
|
|
235
219
|
|
|
236
|
-
Open Graph images, RSS feeds, and JSON-LD structured data, grouped under `seo`.
|
|
237
|
-
See the [SEO guide](/docs/configuration/seo) for metadata, frontmatter overrides, and
|
|
238
|
-
the full reference.
|
|
220
|
+
Open Graph images, RSS feeds, and JSON-LD structured data, grouped under `seo`. See the [SEO guide](/docs/configuration/seo) for metadata, frontmatter overrides, and the full reference.
|
|
239
221
|
|
|
240
222
|
```ts blume.config.ts lineNumbers
|
|
241
223
|
seo: {
|
|
@@ -247,39 +229,50 @@ seo: {
|
|
|
247
229
|
}
|
|
248
230
|
```
|
|
249
231
|
|
|
250
|
-
| Option
|
|
251
|
-
|
|
|
252
|
-
| `og.enabled`
|
|
253
|
-
| `rss.enabled`
|
|
254
|
-
| `rss.types`
|
|
255
|
-
| `rss.limit`
|
|
256
|
-
| `sitemap`
|
|
257
|
-
| `robots`
|
|
258
|
-
| `structuredData` | `true`
|
|
232
|
+
| Option | Default | Description |
|
|
233
|
+
| --- | --- | --- |
|
|
234
|
+
| `og.enabled` | auto | Per-page Open Graph images — on when a site URL is set. |
|
|
235
|
+
| `rss.enabled` | `true` | Build feeds for blog and changelog content. |
|
|
236
|
+
| `rss.types` | `["blog", "changelog"]` | Content types that each get a feed. |
|
|
237
|
+
| `rss.limit` | `50` | Maximum items per feed. |
|
|
238
|
+
| `sitemap` | `true` | Generate sitemap.xml (needs deployment.site). |
|
|
239
|
+
| `robots` | `true` | Generate robots.txt with a Sitemap link. |
|
|
240
|
+
| `structuredData` | `true` | Emit schema.org JSON-LD in each page's head. |
|
|
259
241
|
|
|
260
242
|
These work best with an absolute [`deployment.site`](/docs/deployment) for full URLs.
|
|
261
243
|
|
|
244
|
+
## Table of contents
|
|
245
|
+
|
|
246
|
+
The on-this-page outline is on by default and lists `H2`–`H3` headings. Turn it off, or change the heading range, with `toc`:
|
|
247
|
+
|
|
248
|
+
```ts blume.config.ts
|
|
249
|
+
export default defineConfig({
|
|
250
|
+
toc: false, // hide it everywhere
|
|
251
|
+
// …or narrow the range:
|
|
252
|
+
toc: { minHeadingLevel: 2, maxHeadingLevel: 4 },
|
|
253
|
+
});
|
|
254
|
+
```
|
|
255
|
+
|
|
262
256
|
## Feature options
|
|
263
257
|
|
|
264
258
|
Each of these has its own guide. The config field is the entry point:
|
|
265
259
|
|
|
266
|
-
| Field
|
|
267
|
-
|
|
|
268
|
-
| `theme`
|
|
269
|
-
| `navigation` | Explicit sidebar and header tabs
|
|
270
|
-
| `search`
|
|
271
|
-
| `markdown`
|
|
272
|
-
| `ai`
|
|
273
|
-
| `mcp`
|
|
274
|
-
| `analytics`
|
|
275
|
-
| `seo`
|
|
276
|
-
| `deployment` | Output mode, adapter, and site URL
|
|
277
|
-
| `redirects`
|
|
260
|
+
| Field | What it configures | Guide |
|
|
261
|
+
| --- | --- | --- |
|
|
262
|
+
| `theme` | Accent color, corner radius, fonts, light/dark mode | [Theming](/docs/configuration/theming) |
|
|
263
|
+
| `navigation` | Explicit sidebar and header tabs | [Navigation](/docs/content/navigation) |
|
|
264
|
+
| `search` | Provider (Orama or Pagefind) and indexing | [Search](/docs/configuration/search) |
|
|
265
|
+
| `markdown` | Opt-in Markdown features like math | [Syntax](/docs/content/syntax) |
|
|
266
|
+
| `ai` | `llms.txt`, Ask AI, and the MCP server | [AI](/docs/configuration/ai) |
|
|
267
|
+
| `mcp` | Hosted MCP server for coding agents | [AI](/docs/configuration/ai#mcp-server) |
|
|
268
|
+
| `analytics` | Vercel, PostHog, and custom scripts | [Analytics](/docs/configuration/analytics) |
|
|
269
|
+
| `seo` | Metadata, OG images, feeds, structured data | [SEO](/docs/configuration/seo) |
|
|
270
|
+
| `deployment` | Output mode, adapter, and site URL | [Deployment](/docs/deployment) |
|
|
271
|
+
| `redirects` | Permanent and temporary redirects | [Deployment](/docs/deployment#redirects) |
|
|
278
272
|
|
|
279
273
|
## Precedence
|
|
280
274
|
|
|
281
|
-
Settings resolve from lowest to highest priority, so you only override what you
|
|
282
|
-
need:
|
|
275
|
+
Settings resolve from lowest to highest priority, so you only override what you need:
|
|
283
276
|
|
|
284
277
|
<Steps>
|
|
285
278
|
<Step title="Blume defaults">A sensible default for every field.</Step>
|