blume 0.0.0 → 0.1.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/bin/blume.mjs +18 -0
- package/dist/cli/index.js +11989 -0
- package/dist/cli/index.js.map +141 -0
- package/docs/01-quickstart.mdx +99 -0
- package/docs/02-deployment.mdx +129 -0
- package/docs/advanced/api-reference.mdx +114 -0
- package/docs/advanced/blog.mdx +121 -0
- package/docs/advanced/changelog.mdx +113 -0
- package/docs/advanced/custom-pages.mdx +187 -0
- package/docs/advanced/meta.ts +7 -0
- package/docs/changelog/v0-1-0.mdx +12 -0
- package/docs/changelog/v0-2-0.mdx +16 -0
- package/docs/configuration/ai.mdx +228 -0
- package/docs/configuration/analytics.mdx +98 -0
- package/docs/configuration/customization.mdx +91 -0
- package/docs/configuration/export.mdx +70 -0
- package/docs/configuration/index.mdx +271 -0
- package/docs/configuration/meta.ts +15 -0
- package/docs/configuration/search.mdx +172 -0
- package/docs/configuration/seo.mdx +196 -0
- package/docs/configuration/theming.mdx +178 -0
- package/docs/content/components.mdx +565 -0
- package/docs/content/i18n.mdx +205 -0
- package/docs/content/index.mdx +161 -0
- package/docs/content/islands.mdx +94 -0
- package/docs/content/meta.mdx +119 -0
- package/docs/content/meta.ts +15 -0
- package/docs/content/navigation.mdx +168 -0
- package/docs/content/sources.mdx +216 -0
- package/docs/content/syntax.mdx +445 -0
- package/docs/index.mdx +112 -0
- package/docs/reference/cli.mdx +43 -0
- package/docs/reference/frontmatter.mdx +74 -0
- package/docs/reference/meta.ts +7 -0
- package/package.json +140 -6
- package/src/ai/ask.ts +93 -0
- package/src/ai/llms.ts +65 -0
- package/src/ai/markdown.ts +31 -0
- package/src/ai/mcp/data.ts +74 -0
- package/src/ai/mcp/discovery.ts +49 -0
- package/src/ai/mcp/server.ts +225 -0
- package/src/ai/mcp/tools.ts +47 -0
- package/src/assets/icon.png +0 -0
- package/src/astro/generate.ts +878 -0
- package/src/astro/index.ts +4 -0
- package/src/astro/integration.ts +74 -0
- package/src/astro/islands.ts +131 -0
- package/src/astro/markdown-negotiation.ts +68 -0
- package/src/astro/pages.ts +28 -0
- package/src/astro/templates.ts +1199 -0
- package/src/cli/commands/add.ts +81 -0
- package/src/cli/commands/build.ts +103 -0
- package/src/cli/commands/dev.ts +108 -0
- package/src/cli/commands/doctor.ts +74 -0
- package/src/cli/commands/eject.ts +57 -0
- package/src/cli/commands/init.ts +98 -0
- package/src/cli/commands/migrate.ts +39 -0
- package/src/cli/commands/preview.ts +39 -0
- package/src/cli/commands/sync.ts +52 -0
- package/src/cli/commands/validate.ts +60 -0
- package/src/cli/index.ts +35 -0
- package/src/cli/log.ts +37 -0
- package/src/cli/prepare.ts +80 -0
- package/src/components/Icon.astro +99 -0
- package/src/components/content/Accordion.astro +8 -0
- package/src/components/content/AccordionItem.astro +121 -0
- package/src/components/content/AutoTypeTable.astro +51 -0
- package/src/components/content/Badge.astro +124 -0
- package/src/components/content/Callout.astro +73 -0
- package/src/components/content/Card.astro +104 -0
- package/src/components/content/CardGroup.astro +14 -0
- package/src/components/content/CodeGroup.astro +13 -0
- package/src/components/content/Color.astro +15 -0
- package/src/components/content/ColorItem.astro +87 -0
- package/src/components/content/ColorRow.astro +10 -0
- package/src/components/content/Column.astro +6 -0
- package/src/components/content/Columns.astro +9 -0
- package/src/components/content/Expandable.astro +11 -0
- package/src/components/content/FileTree.astro +8 -0
- package/src/components/content/Frame.astro +70 -0
- package/src/components/content/GithubInfo.astro +110 -0
- package/src/components/content/Math.astro +24 -0
- package/src/components/content/Panel.astro +20 -0
- package/src/components/content/Prompt.astro +129 -0
- package/src/components/content/Step.astro +34 -0
- package/src/components/content/Steps.astro +20 -0
- package/src/components/content/Tab.astro +40 -0
- package/src/components/content/Tabs.astro +273 -0
- package/src/components/content/Tile.astro +42 -0
- package/src/components/content/Tooltip.astro +68 -0
- package/src/components/content/Tree.astro +300 -0
- package/src/components/content/TreeFile.astro +15 -0
- package/src/components/content/TreeFolder.astro +62 -0
- package/src/components/content/TypeTable.astro +106 -0
- package/src/components/content/Update.astro +66 -0
- package/src/components/content/Visibility.astro +12 -0
- package/src/components/content/Warning.astro +9 -0
- package/src/components/content/auto-type-table.ts +141 -0
- package/src/components/content/github-info.ts +79 -0
- package/src/components/content/mermaid-element.ts +68 -0
- package/src/components/github-mark.ts +9 -0
- package/src/components/index.ts +14 -0
- package/src/components/islands/AskAI.astro +12 -0
- package/src/components/islands/ask-ai.tsx +156 -0
- package/src/components/layout/Analytics.astro +63 -0
- package/src/components/layout/Banner.astro +50 -0
- package/src/components/layout/Breadcrumbs.astro +31 -0
- package/src/components/layout/Favicon.astro +15 -0
- package/src/components/layout/Fonts.astro +14 -0
- package/src/components/layout/Header.astro +188 -0
- package/src/components/layout/LanguageSwitcher.astro +56 -0
- package/src/components/layout/NavTree.astro +462 -0
- package/src/components/layout/PageActions.astro +438 -0
- package/src/components/layout/PageFeedback.astro +58 -0
- package/src/components/layout/Pagination.astro +56 -0
- package/src/components/layout/ReferenceLayout.astro +102 -0
- package/src/components/layout/RootLayout.astro +533 -0
- package/src/components/layout/Search.astro +608 -0
- package/src/components/layout/TableOfContents.astro +68 -0
- package/src/components/layout/analytics-client.ts +38 -0
- package/src/components/layout/nav-utils.ts +87 -0
- package/src/components/layout/overrides.ts +32 -0
- package/src/components/layout/search/algolia.ts +43 -0
- package/src/components/layout/search/endpoint.ts +22 -0
- package/src/components/layout/search/flexsearch.ts +52 -0
- package/src/components/layout/search/orama-cloud.ts +41 -0
- package/src/components/layout/search/orama.ts +26 -0
- package/src/components/layout/search/pagefind.ts +43 -0
- package/src/components/layout/search/types.ts +163 -0
- package/src/components/layout/search/typesense.ts +60 -0
- package/src/components/layout/toc-element.ts +108 -0
- package/src/core/bridge.ts +92 -0
- package/src/core/config.ts +112 -0
- package/src/core/content.ts +50 -0
- package/src/core/define-components.ts +34 -0
- package/src/core/define-meta.ts +20 -0
- package/src/core/deployment-env.ts +73 -0
- package/src/core/diagnostics.ts +104 -0
- package/src/core/graph.ts +128 -0
- package/src/core/i18n-ui.ts +171 -0
- package/src/core/i18n.ts +169 -0
- package/src/core/last-modified.ts +88 -0
- package/src/core/links.ts +336 -0
- package/src/core/load-module.ts +15 -0
- package/src/core/manifest.ts +126 -0
- package/src/core/meta.ts +97 -0
- package/src/core/navigation.ts +392 -0
- package/src/core/package-root.ts +37 -0
- package/src/core/project-graph.ts +153 -0
- package/src/core/project.ts +56 -0
- package/src/core/schema.ts +1057 -0
- package/src/core/server-features.ts +23 -0
- package/src/core/sources/assets.ts +77 -0
- package/src/core/sources/cache.ts +122 -0
- package/src/core/sources/filesystem.ts +99 -0
- package/src/core/sources/mdx-remote.ts +216 -0
- package/src/core/sources/mintlify.ts +161 -0
- package/src/core/sources/normalize.ts +227 -0
- package/src/core/sources/notion.ts +440 -0
- package/src/core/sources/portable-text.ts +143 -0
- package/src/core/sources/read.ts +36 -0
- package/src/core/sources/resolve.ts +158 -0
- package/src/core/sources/sanity.ts +218 -0
- package/src/core/sources/types.ts +105 -0
- package/src/core/types.ts +261 -0
- package/src/core/ui-packs/ar.ts +47 -0
- package/src/core/ui-packs/bg.ts +47 -0
- package/src/core/ui-packs/bn.ts +47 -0
- package/src/core/ui-packs/ca.ts +47 -0
- package/src/core/ui-packs/cs.ts +47 -0
- package/src/core/ui-packs/da.ts +47 -0
- package/src/core/ui-packs/de.ts +47 -0
- package/src/core/ui-packs/el.ts +47 -0
- package/src/core/ui-packs/es.ts +47 -0
- package/src/core/ui-packs/fa.ts +47 -0
- package/src/core/ui-packs/fi.ts +47 -0
- package/src/core/ui-packs/fr.ts +47 -0
- package/src/core/ui-packs/he.ts +47 -0
- package/src/core/ui-packs/hi.ts +47 -0
- package/src/core/ui-packs/hr.ts +47 -0
- package/src/core/ui-packs/hu.ts +47 -0
- package/src/core/ui-packs/id.ts +47 -0
- package/src/core/ui-packs/index.ts +87 -0
- package/src/core/ui-packs/it.ts +47 -0
- package/src/core/ui-packs/ja.ts +47 -0
- package/src/core/ui-packs/ko.ts +47 -0
- package/src/core/ui-packs/nl.ts +47 -0
- package/src/core/ui-packs/no.ts +47 -0
- package/src/core/ui-packs/pl.ts +47 -0
- package/src/core/ui-packs/pt-br.ts +47 -0
- package/src/core/ui-packs/pt.ts +47 -0
- package/src/core/ui-packs/ro.ts +47 -0
- package/src/core/ui-packs/ru.ts +47 -0
- package/src/core/ui-packs/sk.ts +47 -0
- package/src/core/ui-packs/sr.ts +47 -0
- package/src/core/ui-packs/sv.ts +47 -0
- package/src/core/ui-packs/th.ts +47 -0
- package/src/core/ui-packs/tr.ts +47 -0
- package/src/core/ui-packs/uk.ts +47 -0
- package/src/core/ui-packs/vi.ts +47 -0
- package/src/core/ui-packs/zh-tw.ts +47 -0
- package/src/core/ui-packs/zh.ts +47 -0
- package/src/core/version.ts +23 -0
- package/src/deploy/robots.ts +20 -0
- package/src/deploy/rss.ts +128 -0
- package/src/deploy/sitemap.ts +28 -0
- package/src/index.ts +27 -0
- package/src/markdown/code-title.ts +71 -0
- package/src/markdown/directives.ts +83 -0
- package/src/markdown/heading-anchors.ts +137 -0
- package/src/markdown/index.ts +159 -0
- package/src/markdown/inline-code.ts +108 -0
- package/src/markdown/language-icon.ts +172 -0
- package/src/markdown/math.ts +32 -0
- package/src/markdown/mdast.ts +48 -0
- package/src/markdown/mermaid.ts +37 -0
- package/src/markdown/package-commands.ts +159 -0
- package/src/markdown/package-install.ts +40 -0
- package/src/migrate/fumadocs/config.ts +106 -0
- package/src/migrate/fumadocs/content.ts +365 -0
- package/src/migrate/fumadocs/frontmatter.ts +18 -0
- package/src/migrate/fumadocs/index.ts +252 -0
- package/src/migrate/fumadocs/meta.ts +114 -0
- package/src/migrate/migrate.ts +53 -0
- package/src/migrate/mintlify/config.ts +1040 -0
- package/src/migrate/mintlify/content.ts +98 -0
- package/src/migrate/mintlify/frontmatter.ts +126 -0
- package/src/migrate/mintlify/i18n.ts +51 -0
- package/src/migrate/mintlify/icons.ts +128 -0
- package/src/migrate/mintlify/index.ts +266 -0
- package/src/migrate/mintlify/snippets.ts +305 -0
- package/src/migrate/mintlify/transform.ts +81 -0
- package/src/migrate/nextra/content.ts +46 -0
- package/src/migrate/nextra/frontmatter.ts +40 -0
- package/src/migrate/nextra/index.ts +374 -0
- package/src/migrate/nextra/meta.ts +266 -0
- package/src/migrate/shared.ts +623 -0
- package/src/migrate/starlight/config.ts +459 -0
- package/src/migrate/starlight/content.ts +78 -0
- package/src/migrate/starlight/frontmatter.ts +111 -0
- package/src/migrate/starlight/i18n.ts +54 -0
- package/src/migrate/starlight/index.ts +131 -0
- package/src/og/card.ts +92 -0
- package/src/og/index.ts +2 -0
- package/src/openapi/scalar.ts +246 -0
- package/src/registry/eject.ts +263 -0
- package/src/registry/registry.ts +100 -0
- package/src/registry/rewrite-imports.ts +39 -0
- package/src/runtime/index.ts +14 -0
- package/src/search/build.ts +23 -0
- package/src/search/documents.ts +165 -0
- package/src/search/orama-index.ts +66 -0
- package/src/search/providers.ts +91 -0
- package/src/search/sync/algolia.ts +30 -0
- package/src/search/sync/index.ts +50 -0
- package/src/search/sync/orama-cloud.ts +40 -0
- package/src/search/sync/typesense.ts +65 -0
- package/src/seo/jsonld.ts +113 -0
- package/src/theme/entry.ts +608 -0
- package/src/theme/fonts.ts +198 -0
- package/src/theme/icons.ts +184 -0
- package/src/theme/palette.ts +143 -0
- package/src/theme/twoslash.ts +81 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Export
|
|
3
|
+
description: Let readers download any page as a PDF or EPUB.
|
|
4
|
+
---
|
|
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.
|
|
11
|
+
|
|
12
|
+
## Enable it
|
|
13
|
+
|
|
14
|
+
Turn on both formats with a single toggle:
|
|
15
|
+
|
|
16
|
+
```ts blume.config.ts
|
|
17
|
+
export: true,
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
To offer just one format, pass an object instead:
|
|
21
|
+
|
|
22
|
+
```ts blume.config.ts
|
|
23
|
+
export: {
|
|
24
|
+
pdf: true,
|
|
25
|
+
epub: false,
|
|
26
|
+
},
|
|
27
|
+
```
|
|
28
|
+
|
|
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.
|
|
31
|
+
|
|
32
|
+
## PDF
|
|
33
|
+
|
|
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.
|
|
37
|
+
|
|
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.
|
|
41
|
+
|
|
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
|
+
:::
|
|
47
|
+
|
|
48
|
+
## EPUB
|
|
49
|
+
|
|
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.
|
|
54
|
+
|
|
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.
|
|
59
|
+
|
|
60
|
+
## What gets exported
|
|
61
|
+
|
|
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.
|
|
64
|
+
|
|
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
|
+
:::
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration file
|
|
3
|
+
description: Every option in blume.config.ts — site metadata, content, and links to each feature guide.
|
|
4
|
+
sidebar:
|
|
5
|
+
label: blume.config.ts
|
|
6
|
+
---
|
|
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.
|
|
11
|
+
|
|
12
|
+
```ts blume.config.ts lineNumbers
|
|
13
|
+
import { defineConfig } from "blume";
|
|
14
|
+
|
|
15
|
+
export default defineConfig({
|
|
16
|
+
title: "My Docs",
|
|
17
|
+
description: "Documentation for my project.",
|
|
18
|
+
});
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## A complete example
|
|
22
|
+
|
|
23
|
+
Every option Blume reads, with its default:
|
|
24
|
+
|
|
25
|
+
```ts blume.config.ts lineNumbers
|
|
26
|
+
import { defineConfig } from "blume";
|
|
27
|
+
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
// Site
|
|
30
|
+
title: "My Docs",
|
|
31
|
+
description: "Documentation for my project.",
|
|
32
|
+
logo: "/logo.svg",
|
|
33
|
+
|
|
34
|
+
// Content
|
|
35
|
+
content: {
|
|
36
|
+
root: "docs",
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
// Theme — see the Theming guide
|
|
40
|
+
theme: {
|
|
41
|
+
accent: "teal",
|
|
42
|
+
radius: "md",
|
|
43
|
+
mode: "system",
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
// Search — see the Search guide
|
|
47
|
+
search: {
|
|
48
|
+
provider: "orama",
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
// Markdown features
|
|
52
|
+
markdown: {
|
|
53
|
+
imageZoom: true,
|
|
54
|
+
math: false,
|
|
55
|
+
code: {
|
|
56
|
+
icons: true, // language icon in the code-block header
|
|
57
|
+
wrap: false, // wrap long lines instead of scrolling
|
|
58
|
+
inline: false, // highlight inline `code{:lang}` snippets
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
// AI — see the AI guide
|
|
63
|
+
ai: {
|
|
64
|
+
llmsTxt: true,
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
// MCP server (needs server output) — see the AI guide
|
|
68
|
+
mcp: {
|
|
69
|
+
enabled: false,
|
|
70
|
+
route: "/mcp",
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
// SEO — OG images, feeds, sitemap, structured data; see the SEO guide
|
|
74
|
+
seo: {
|
|
75
|
+
og: { enabled: true },
|
|
76
|
+
rss: { enabled: true, types: ["blog", "changelog"] },
|
|
77
|
+
sitemap: true,
|
|
78
|
+
robots: true,
|
|
79
|
+
structuredData: true,
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
// Deployment — see the Deployment guide
|
|
83
|
+
deployment: {
|
|
84
|
+
output: "static",
|
|
85
|
+
site: "https://docs.example.com",
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Site
|
|
91
|
+
|
|
92
|
+
| Option | Default | Description |
|
|
93
|
+
| ------------- | ----------------- | ------------------------------------------------------- |
|
|
94
|
+
| `title` | `"Documentation"` | Site name — shown in the header, page titles, OG cards. |
|
|
95
|
+
| `description` | — | Default meta description, used for SEO and OG. |
|
|
96
|
+
| `logo` | — | Brand logo shown beside the title in the header. |
|
|
97
|
+
| `banner` | — | Site-wide announcement bar above the header. |
|
|
98
|
+
|
|
99
|
+
### Logo
|
|
100
|
+
|
|
101
|
+
Point `logo` at an SVG and Blume inlines it, so a `currentColor` logo follows
|
|
102
|
+
the light and dark theme automatically:
|
|
103
|
+
|
|
104
|
+
```ts blume.config.ts
|
|
105
|
+
logo: "/logo.svg",
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The SVG can live at your project root or in `public/`. For raster images — or
|
|
109
|
+
separate light and dark artwork — use the object form (these must live in
|
|
110
|
+
`public/`):
|
|
111
|
+
|
|
112
|
+
```ts blume.config.ts lineNumbers
|
|
113
|
+
logo: {
|
|
114
|
+
light: "/logo-light.png",
|
|
115
|
+
dark: "/logo-dark.png",
|
|
116
|
+
alt: "Acme",
|
|
117
|
+
href: "/",
|
|
118
|
+
},
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
`href` overrides the logo's link (it defaults to `/`).
|
|
122
|
+
|
|
123
|
+
### Favicon
|
|
124
|
+
|
|
125
|
+
There's no favicon option — Blume auto-detects one by filename, the way Next.js
|
|
126
|
+
does. Drop an `icon` or `favicon` file (`.svg`, `.png`, or `.ico`) in your
|
|
127
|
+
project root or `public/` directory and it becomes the browser tab icon:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
my-docs/
|
|
131
|
+
├─ blume.config.ts
|
|
132
|
+
├─ icon.png ← picked up automatically
|
|
133
|
+
└─ docs/
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
SVG wins over PNG over ICO when several are present, and a file in `public/` is
|
|
137
|
+
preferred over one at the root. If Blume finds no icon, it falls back to its own
|
|
138
|
+
mark.
|
|
139
|
+
|
|
140
|
+
### Banner
|
|
141
|
+
|
|
142
|
+
Show a site-wide announcement bar above the header. Pass a string, or an object
|
|
143
|
+
with a link and a dismiss button:
|
|
144
|
+
|
|
145
|
+
```ts blume.config.ts
|
|
146
|
+
banner: "Docs are in beta — expect changes.",
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
```ts blume.config.ts lineNumbers
|
|
150
|
+
banner: {
|
|
151
|
+
content: "Blume v1 is here!",
|
|
152
|
+
link: { text: "Read more", href: "/blog/v1" },
|
|
153
|
+
dismissible: true,
|
|
154
|
+
id: "v1",
|
|
155
|
+
},
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
When `dismissible` is on, the bar shows a close button and stays hidden for that
|
|
159
|
+
visitor afterward. The dismissal key defaults to the content text, so editing
|
|
160
|
+
the message brings the banner back; set a stable `id` to keep it dismissed
|
|
161
|
+
across edits.
|
|
162
|
+
|
|
163
|
+
## Content
|
|
164
|
+
|
|
165
|
+
Where your content lives and how Blume discovers it. See [Pages](/docs/content) for
|
|
166
|
+
how files become routes.
|
|
167
|
+
|
|
168
|
+
```ts blume.config.ts lineNumbers
|
|
169
|
+
content: {
|
|
170
|
+
root: "docs",
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
| Option | Default | Description |
|
|
175
|
+
| ------------- | -------------------- | -------------------------------------------- |
|
|
176
|
+
| `root` | `"docs"` | Folder Blume scans for content. |
|
|
177
|
+
| `include` | `["**/*.{md,mdx}"]` | Globs that match content files. |
|
|
178
|
+
| `exclude` | `["**/_*", "**/.*"]` | Globs to ignore (underscore- and dot-files). |
|
|
179
|
+
| `pages` | `"pages"` | Folder for custom `.astro` pages. |
|
|
180
|
+
| `defaultType` | `"doc"` | Page `type` used when frontmatter omits it. |
|
|
181
|
+
|
|
182
|
+
## Last modified
|
|
183
|
+
|
|
184
|
+
Show a "Last updated on …" line at the bottom of each page. Off by default; set
|
|
185
|
+
`lastModified` to `true` to derive each page's date from its git history:
|
|
186
|
+
|
|
187
|
+
```ts blume.config.ts
|
|
188
|
+
lastModified: true,
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
| Value | Description |
|
|
192
|
+
| ------------------------- | -------------------------------------------------------------- |
|
|
193
|
+
| `false` | Disabled (default). |
|
|
194
|
+
| `true` | Read the date from git history (commit dates). |
|
|
195
|
+
| `{ type: "git" }` | Same as `true`, written explicitly. |
|
|
196
|
+
| `{ type: "frontmatter" }` | Never run git — use only the `lastModified` frontmatter field. |
|
|
197
|
+
|
|
198
|
+
The git source reads the most recent commit that touched each file, so it works
|
|
199
|
+
in any git repository — including monorepos — and needs the repo's history at
|
|
200
|
+
build time (avoid a shallow `--depth 1` checkout in CI). A page's own
|
|
201
|
+
`lastModified` frontmatter always wins, which is handy for pinning a date or for
|
|
202
|
+
files that aren't committed yet:
|
|
203
|
+
|
|
204
|
+
```mdx page.mdx
|
|
205
|
+
---
|
|
206
|
+
title: My page
|
|
207
|
+
lastModified: 2026-06-20
|
|
208
|
+
---
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
When enabled, the date is also emitted as schema.org `dateModified` in the
|
|
212
|
+
page's structured data.
|
|
213
|
+
|
|
214
|
+
## SEO
|
|
215
|
+
|
|
216
|
+
Open Graph images, RSS feeds, and JSON-LD structured data, grouped under `seo`.
|
|
217
|
+
See the [SEO guide](/docs/configuration/seo) for metadata, frontmatter overrides, and
|
|
218
|
+
the full reference.
|
|
219
|
+
|
|
220
|
+
```ts blume.config.ts lineNumbers
|
|
221
|
+
seo: {
|
|
222
|
+
og: { enabled: false },
|
|
223
|
+
rss: { enabled: true, types: ["blog", "changelog"] },
|
|
224
|
+
sitemap: true,
|
|
225
|
+
robots: true,
|
|
226
|
+
structuredData: true,
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
| Option | Default | Description |
|
|
231
|
+
| ---------------- | ----------------------- | --------------------------------------------- |
|
|
232
|
+
| `og.enabled` | `false` | Generate per-page Open Graph images. |
|
|
233
|
+
| `rss.enabled` | `true` | Build feeds for blog and changelog content. |
|
|
234
|
+
| `rss.types` | `["blog", "changelog"]` | Content types that each get a feed. |
|
|
235
|
+
| `rss.limit` | `50` | Maximum items per feed. |
|
|
236
|
+
| `sitemap` | `true` | Generate sitemap.xml (needs deployment.site). |
|
|
237
|
+
| `robots` | `true` | Generate robots.txt with a Sitemap link. |
|
|
238
|
+
| `structuredData` | `true` | Emit schema.org JSON-LD in each page's head. |
|
|
239
|
+
|
|
240
|
+
These work best with an absolute [`deployment.site`](/docs/deployment) for full URLs.
|
|
241
|
+
|
|
242
|
+
## Feature options
|
|
243
|
+
|
|
244
|
+
Each of these has its own guide. The config field is the entry point:
|
|
245
|
+
|
|
246
|
+
| Field | What it configures | Guide |
|
|
247
|
+
| ------------ | --------------------------------------------------- | ------------------------------------------ |
|
|
248
|
+
| `theme` | Accent color, corner radius, fonts, light/dark mode | [Theming](/docs/configuration/theming) |
|
|
249
|
+
| `navigation` | Explicit sidebar and header tabs | [Navigation](/docs/content/navigation) |
|
|
250
|
+
| `search` | Provider (Orama or Pagefind) and indexing | [Search](/docs/configuration/search) |
|
|
251
|
+
| `markdown` | Opt-in Markdown features like math | [Syntax](/docs/content/syntax) |
|
|
252
|
+
| `ai` | `llms.txt`, Ask AI, and the MCP server | [AI](/docs/configuration/ai) |
|
|
253
|
+
| `mcp` | Hosted MCP server for coding agents | [AI](/docs/configuration/ai#mcp-server) |
|
|
254
|
+
| `analytics` | Vercel, PostHog, and custom scripts | [Analytics](/docs/configuration/analytics) |
|
|
255
|
+
| `seo` | Metadata, OG images, feeds, structured data | [SEO](/docs/configuration/seo) |
|
|
256
|
+
| `deployment` | Output mode, adapter, and site URL | [Deployment](/docs/deployment) |
|
|
257
|
+
| `redirects` | Permanent and temporary redirects | [Deployment](/docs/deployment#redirects) |
|
|
258
|
+
|
|
259
|
+
## Precedence
|
|
260
|
+
|
|
261
|
+
Settings resolve from lowest to highest priority, so you only override what you
|
|
262
|
+
need:
|
|
263
|
+
|
|
264
|
+
<Steps>
|
|
265
|
+
<Step title="Blume defaults">A sensible default for every field.</Step>
|
|
266
|
+
<Step title="blume.config.ts">Your project-wide configuration.</Step>
|
|
267
|
+
<Step title="Folder meta">
|
|
268
|
+
[`meta.ts`](/docs/content/meta) for a section's title and ordering.
|
|
269
|
+
</Step>
|
|
270
|
+
<Step title="Page frontmatter">Per-page overrides win.</Step>
|
|
271
|
+
</Steps>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Search
|
|
3
|
+
description: Client-side search out of the box, with optional hosted and semantic backends.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Blume ships local search with no hosted infrastructure and no API keys. It runs
|
|
7
|
+
in the browser, works in both `blume dev` and `blume build`, and indexes only
|
|
8
|
+
your real content — navigation chrome and excluded pages are skipped. When you
|
|
9
|
+
outgrow it, you can switch to a hosted or semantic backend without changing how
|
|
10
|
+
search looks or behaves — only the `search.provider` you configure changes.
|
|
11
|
+
|
|
12
|
+
Blume reaches parity with Fumadocs' provider set: **Orama**, **FlexSearch**,
|
|
13
|
+
**Algolia**, **Orama Cloud**, **Typesense**, and **Mixedbread** (plus
|
|
14
|
+
**Pagefind**). Only the configured provider's SDK is installed into your project,
|
|
15
|
+
so picking one backend never pulls in the others.
|
|
16
|
+
|
|
17
|
+
## Using search
|
|
18
|
+
|
|
19
|
+
Open search with <Badge variant="accent">⌘K</Badge> (or `Ctrl K`), or press `/`
|
|
20
|
+
when you're not typing in a field. `Esc` closes it.
|
|
21
|
+
|
|
22
|
+
Queries match page **titles**, **descriptions**, and **body text**, with title
|
|
23
|
+
matches ranked highest and descriptions above body.
|
|
24
|
+
|
|
25
|
+
## What's indexed
|
|
26
|
+
|
|
27
|
+
For every indexable page, Blume indexes its title, description, and body reduced
|
|
28
|
+
to plain text — code blocks, images, and markup are stripped, so results stay
|
|
29
|
+
relevant. The index is built from your source files, so it's identical in dev and
|
|
30
|
+
production.
|
|
31
|
+
|
|
32
|
+
## Providers
|
|
33
|
+
|
|
34
|
+
The client-side providers are keyless and need no extra config. The hosted ones
|
|
35
|
+
take **public** credentials in `blume.config.ts` (safe to ship to the browser)
|
|
36
|
+
and read their **secret** admin key from an environment variable at build time —
|
|
37
|
+
the secret never lands in the config or the client bundle.
|
|
38
|
+
|
|
39
|
+
### Orama (default)
|
|
40
|
+
|
|
41
|
+
Blume's default engine. It builds a JSON index served at `/blume-search.json` and
|
|
42
|
+
queries it in the browser — instant, client-side, and live in `blume dev` as you
|
|
43
|
+
edit. No keys, no service.
|
|
44
|
+
|
|
45
|
+
```ts blume.config.ts lineNumbers
|
|
46
|
+
search: {
|
|
47
|
+
provider: "orama", // default
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### FlexSearch
|
|
52
|
+
|
|
53
|
+
A second keyless, client-side option. It reuses the same `/blume-search.json`
|
|
54
|
+
index Orama ships and builds a [FlexSearch](https://github.com/nextapps-de/flexsearch)
|
|
55
|
+
document index in the browser. Works in `blume dev` and `blume build`.
|
|
56
|
+
|
|
57
|
+
```ts blume.config.ts lineNumbers
|
|
58
|
+
search: {
|
|
59
|
+
provider: "flexsearch",
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Pagefind
|
|
64
|
+
|
|
65
|
+
For very large docs, opt into [Pagefind](https://pagefind.app). It indexes your
|
|
66
|
+
built HTML and loads the index in shards on demand, keeping the initial payload
|
|
67
|
+
tiny no matter how big the site grows.
|
|
68
|
+
|
|
69
|
+
```ts blume.config.ts lineNumbers
|
|
70
|
+
search: {
|
|
71
|
+
provider: "pagefind",
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Pagefind only runs during `blume build`, so search isn't available in `blume dev`
|
|
76
|
+
with this provider.
|
|
77
|
+
|
|
78
|
+
### Algolia
|
|
79
|
+
|
|
80
|
+
The browser queries [Algolia](https://www.algolia.com) directly with your
|
|
81
|
+
search-only key. Each `blume build` uploads the index using the admin key from
|
|
82
|
+
`ALGOLIA_ADMIN_API_KEY` (the build warns and skips the upload if it's unset).
|
|
83
|
+
|
|
84
|
+
```ts blume.config.ts lineNumbers
|
|
85
|
+
search: {
|
|
86
|
+
provider: "algolia",
|
|
87
|
+
algolia: {
|
|
88
|
+
appId: "YOUR_APP_ID",
|
|
89
|
+
indexName: "docs",
|
|
90
|
+
searchApiKey: "YOUR_SEARCH_ONLY_KEY", // public
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Orama Cloud
|
|
96
|
+
|
|
97
|
+
Hosted Orama. The browser queries your index endpoint with the public API key;
|
|
98
|
+
`blume build` pushes records to the index using `ORAMA_PRIVATE_API_KEY`. Set
|
|
99
|
+
`indexId` to enable the sync.
|
|
100
|
+
|
|
101
|
+
```ts blume.config.ts lineNumbers
|
|
102
|
+
search: {
|
|
103
|
+
provider: "orama-cloud",
|
|
104
|
+
oramaCloud: {
|
|
105
|
+
endpoint: "https://cloud.orama.run/v1/indexes/your-index",
|
|
106
|
+
apiKey: "YOUR_PUBLIC_API_KEY",
|
|
107
|
+
indexId: "your-index-id", // for the build-time sync
|
|
108
|
+
},
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Typesense
|
|
113
|
+
|
|
114
|
+
Self-hosted or cloud [Typesense](https://typesense.org). The browser queries the
|
|
115
|
+
collection with the search-only key; `blume build` creates the collection (if
|
|
116
|
+
needed) and imports documents using `TYPESENSE_ADMIN_API_KEY`.
|
|
117
|
+
|
|
118
|
+
```ts blume.config.ts lineNumbers
|
|
119
|
+
search: {
|
|
120
|
+
provider: "typesense",
|
|
121
|
+
typesense: {
|
|
122
|
+
host: "xyz.a1.typesense.net",
|
|
123
|
+
collection: "docs",
|
|
124
|
+
searchApiKey: "YOUR_SEARCH_ONLY_KEY", // public
|
|
125
|
+
// port + protocol default to 443 / https
|
|
126
|
+
},
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Mixedbread
|
|
131
|
+
|
|
132
|
+
Semantic search via [Mixedbread](https://www.mixedbread.com). Queries are proxied
|
|
133
|
+
through a generated `/api/search` endpoint that holds your key, so this provider
|
|
134
|
+
**requires server output** (`deployment.output: "server"`). The endpoint reads
|
|
135
|
+
`MIXEDBREAD_API_KEY`. Sync your content to the store with the Mixedbread CLI in
|
|
136
|
+
your build, e.g. `mxbai vs sync <STORE_ID> ./content --ci`.
|
|
137
|
+
|
|
138
|
+
```ts blume.config.ts lineNumbers
|
|
139
|
+
search: {
|
|
140
|
+
provider: "mixedbread",
|
|
141
|
+
mixedbread: {
|
|
142
|
+
storeId: "YOUR_STORE_ID",
|
|
143
|
+
},
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Disabling search
|
|
148
|
+
|
|
149
|
+
```ts blume.config.ts lineNumbers
|
|
150
|
+
search: {
|
|
151
|
+
provider: "none",
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Excluding pages
|
|
156
|
+
|
|
157
|
+
Only indexable pages are searched. A page is left out of the index when it sets
|
|
158
|
+
`search.exclude` in frontmatter:
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
search:
|
|
162
|
+
exclude: true
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
[Hidden pages](/docs/content/navigation#hidden-pages) are also excluded by default.
|
|
166
|
+
To index them anyway, opt in:
|
|
167
|
+
|
|
168
|
+
```ts blume.config.ts lineNumbers
|
|
169
|
+
search: {
|
|
170
|
+
indexing: { includeHiddenPages: true },
|
|
171
|
+
}
|
|
172
|
+
```
|