blume 0.0.0 → 0.1.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.
Files changed (330) hide show
  1. package/bin/blume.mjs +18 -0
  2. package/dist/cli/index.js +12696 -0
  3. package/dist/cli/index.js.map +145 -0
  4. package/dist/types/core/bridge.d.ts +24 -0
  5. package/dist/types/core/config.d.ts +35 -0
  6. package/dist/types/core/data.d.ts +129 -0
  7. package/dist/types/core/define-components.d.ts +27 -0
  8. package/dist/types/core/define-meta.d.ts +16 -0
  9. package/dist/types/core/deployment-env.d.ts +9 -0
  10. package/dist/types/core/diagnostics.d.ts +17 -0
  11. package/dist/types/core/i18n-ui.d.ts +500 -0
  12. package/dist/types/core/load-module.d.ts +7 -0
  13. package/dist/types/core/package-root.d.ts +17 -0
  14. package/dist/types/core/project.d.ts +9 -0
  15. package/dist/types/core/schema.d.ts +3451 -0
  16. package/dist/types/core/sources/types.d.ts +107 -0
  17. package/dist/types/core/types.d.ts +245 -0
  18. package/dist/types/core/ui-packs/ar.d.ts +3 -0
  19. package/dist/types/core/ui-packs/bg.d.ts +3 -0
  20. package/dist/types/core/ui-packs/bn.d.ts +3 -0
  21. package/dist/types/core/ui-packs/ca.d.ts +3 -0
  22. package/dist/types/core/ui-packs/cs.d.ts +3 -0
  23. package/dist/types/core/ui-packs/da.d.ts +3 -0
  24. package/dist/types/core/ui-packs/de.d.ts +3 -0
  25. package/dist/types/core/ui-packs/el.d.ts +3 -0
  26. package/dist/types/core/ui-packs/es.d.ts +3 -0
  27. package/dist/types/core/ui-packs/fa.d.ts +3 -0
  28. package/dist/types/core/ui-packs/fi.d.ts +3 -0
  29. package/dist/types/core/ui-packs/fr.d.ts +3 -0
  30. package/dist/types/core/ui-packs/he.d.ts +3 -0
  31. package/dist/types/core/ui-packs/hi.d.ts +3 -0
  32. package/dist/types/core/ui-packs/hr.d.ts +3 -0
  33. package/dist/types/core/ui-packs/hu.d.ts +3 -0
  34. package/dist/types/core/ui-packs/id.d.ts +3 -0
  35. package/dist/types/core/ui-packs/index.d.ts +13 -0
  36. package/dist/types/core/ui-packs/it.d.ts +3 -0
  37. package/dist/types/core/ui-packs/ja.d.ts +3 -0
  38. package/dist/types/core/ui-packs/ko.d.ts +3 -0
  39. package/dist/types/core/ui-packs/nl.d.ts +3 -0
  40. package/dist/types/core/ui-packs/no.d.ts +3 -0
  41. package/dist/types/core/ui-packs/pl.d.ts +3 -0
  42. package/dist/types/core/ui-packs/pt-br.d.ts +3 -0
  43. package/dist/types/core/ui-packs/pt.d.ts +3 -0
  44. package/dist/types/core/ui-packs/ro.d.ts +3 -0
  45. package/dist/types/core/ui-packs/ru.d.ts +3 -0
  46. package/dist/types/core/ui-packs/sk.d.ts +3 -0
  47. package/dist/types/core/ui-packs/sr.d.ts +3 -0
  48. package/dist/types/core/ui-packs/sv.d.ts +3 -0
  49. package/dist/types/core/ui-packs/th.d.ts +3 -0
  50. package/dist/types/core/ui-packs/tr.d.ts +3 -0
  51. package/dist/types/core/ui-packs/uk.d.ts +3 -0
  52. package/dist/types/core/ui-packs/vi.d.ts +3 -0
  53. package/dist/types/core/ui-packs/zh-tw.d.ts +3 -0
  54. package/dist/types/core/ui-packs/zh.d.ts +3 -0
  55. package/dist/types/core/version.d.ts +8 -0
  56. package/dist/types/index.d.ts +10 -0
  57. package/dist/types/migrate/mintlify/config.d.ts +2 -0
  58. package/dist/types/migrate/mintlify/i18n.d.ts +7 -0
  59. package/dist/types/theme/fonts.d.ts +163 -0
  60. package/docs/01-quickstart.mdx +99 -0
  61. package/docs/02-deployment.mdx +129 -0
  62. package/docs/advanced/api-reference.mdx +114 -0
  63. package/docs/advanced/blog.mdx +121 -0
  64. package/docs/advanced/changelog.mdx +113 -0
  65. package/docs/advanced/custom-pages.mdx +268 -0
  66. package/docs/advanced/meta.ts +7 -0
  67. package/docs/changelog/v0-1-0.mdx +12 -0
  68. package/docs/changelog/v0-2-0.mdx +16 -0
  69. package/docs/configuration/ai.mdx +228 -0
  70. package/docs/configuration/analytics.mdx +98 -0
  71. package/docs/configuration/customization.mdx +91 -0
  72. package/docs/configuration/export.mdx +70 -0
  73. package/docs/configuration/index.mdx +290 -0
  74. package/docs/configuration/meta.ts +15 -0
  75. package/docs/configuration/search.mdx +172 -0
  76. package/docs/configuration/seo.mdx +196 -0
  77. package/docs/configuration/theming.mdx +178 -0
  78. package/docs/content/components.mdx +651 -0
  79. package/docs/content/i18n.mdx +205 -0
  80. package/docs/content/index.mdx +161 -0
  81. package/docs/content/islands.mdx +94 -0
  82. package/docs/content/meta.mdx +119 -0
  83. package/docs/content/meta.ts +15 -0
  84. package/docs/content/navigation.mdx +168 -0
  85. package/docs/content/sources.mdx +216 -0
  86. package/docs/content/syntax.mdx +445 -0
  87. package/docs/index.mdx +112 -0
  88. package/docs/reference/cli.mdx +43 -0
  89. package/docs/reference/frontmatter.mdx +74 -0
  90. package/docs/reference/meta.ts +7 -0
  91. package/package.json +150 -6
  92. package/src/ai/ask.ts +93 -0
  93. package/src/ai/llms.ts +64 -0
  94. package/src/ai/markdown.ts +31 -0
  95. package/src/ai/mcp/data.ts +74 -0
  96. package/src/ai/mcp/discovery.ts +49 -0
  97. package/src/ai/mcp/server.ts +225 -0
  98. package/src/ai/mcp/tools.ts +47 -0
  99. package/src/assets/icon.png +0 -0
  100. package/src/astro/examples.ts +104 -0
  101. package/src/astro/generate.ts +1006 -0
  102. package/src/astro/index.ts +4 -0
  103. package/src/astro/integration.ts +74 -0
  104. package/src/astro/islands.ts +131 -0
  105. package/src/astro/markdown-negotiation.ts +68 -0
  106. package/src/astro/pages.ts +87 -0
  107. package/src/astro/templates.ts +1326 -0
  108. package/src/cli/commands/add.ts +81 -0
  109. package/src/cli/commands/build.ts +103 -0
  110. package/src/cli/commands/dev.ts +108 -0
  111. package/src/cli/commands/doctor.ts +74 -0
  112. package/src/cli/commands/eject.ts +57 -0
  113. package/src/cli/commands/init.ts +98 -0
  114. package/src/cli/commands/migrate.ts +39 -0
  115. package/src/cli/commands/preview.ts +39 -0
  116. package/src/cli/commands/sync.ts +52 -0
  117. package/src/cli/commands/validate.ts +61 -0
  118. package/src/cli/index.ts +35 -0
  119. package/src/cli/log.ts +37 -0
  120. package/src/cli/prepare.ts +80 -0
  121. package/src/components/Icon.astro +99 -0
  122. package/src/components/content/Accordion.astro +8 -0
  123. package/src/components/content/AccordionItem.astro +121 -0
  124. package/src/components/content/AutoTypeTable.astro +51 -0
  125. package/src/components/content/Badge.astro +124 -0
  126. package/src/components/content/Callout.astro +73 -0
  127. package/src/components/content/Card.astro +104 -0
  128. package/src/components/content/CardGroup.astro +14 -0
  129. package/src/components/content/CodeBlock.astro +28 -0
  130. package/src/components/content/CodeGroup.astro +13 -0
  131. package/src/components/content/Color.astro +15 -0
  132. package/src/components/content/ColorItem.astro +87 -0
  133. package/src/components/content/ColorRow.astro +10 -0
  134. package/src/components/content/Column.astro +6 -0
  135. package/src/components/content/Columns.astro +9 -0
  136. package/src/components/content/Component.astro +65 -0
  137. package/src/components/content/Diff.astro +44 -0
  138. package/src/components/content/Expandable.astro +11 -0
  139. package/src/components/content/FileTree.astro +8 -0
  140. package/src/components/content/Frame.astro +70 -0
  141. package/src/components/content/GithubInfo.astro +110 -0
  142. package/src/components/content/Math.astro +24 -0
  143. package/src/components/content/Panel.astro +20 -0
  144. package/src/components/content/Prompt.astro +129 -0
  145. package/src/components/content/Step.astro +34 -0
  146. package/src/components/content/Steps.astro +20 -0
  147. package/src/components/content/Tab.astro +46 -0
  148. package/src/components/content/Tabs.astro +273 -0
  149. package/src/components/content/Tile.astro +42 -0
  150. package/src/components/content/Tooltip.astro +68 -0
  151. package/src/components/content/Tree.astro +300 -0
  152. package/src/components/content/TreeFile.astro +15 -0
  153. package/src/components/content/TreeFolder.astro +62 -0
  154. package/src/components/content/TypeTable.astro +106 -0
  155. package/src/components/content/Update.astro +66 -0
  156. package/src/components/content/Visibility.astro +12 -0
  157. package/src/components/content/Warning.astro +9 -0
  158. package/src/components/content/auto-type-table.ts +141 -0
  159. package/src/components/content/diff.ts +95 -0
  160. package/src/components/content/github-info.ts +79 -0
  161. package/src/components/content/mermaid-element.ts +68 -0
  162. package/src/components/github-mark.ts +9 -0
  163. package/src/components/index.ts +14 -0
  164. package/src/components/islands/AskAI.astro +12 -0
  165. package/src/components/islands/ask-ai.tsx +156 -0
  166. package/src/components/layout/Analytics.astro +63 -0
  167. package/src/components/layout/Banner.astro +50 -0
  168. package/src/components/layout/Breadcrumbs.astro +31 -0
  169. package/src/components/layout/Favicon.astro +22 -0
  170. package/src/components/layout/Fonts.astro +14 -0
  171. package/src/components/layout/Header.astro +188 -0
  172. package/src/components/layout/LanguageSwitcher.astro +56 -0
  173. package/src/components/layout/NavTree.astro +462 -0
  174. package/src/components/layout/PageActions.astro +438 -0
  175. package/src/components/layout/PageFeedback.astro +58 -0
  176. package/src/components/layout/PageLayout.astro +173 -0
  177. package/src/components/layout/Pagination.astro +56 -0
  178. package/src/components/layout/ReferenceLayout.astro +107 -0
  179. package/src/components/layout/RootLayout.astro +537 -0
  180. package/src/components/layout/Search.astro +608 -0
  181. package/src/components/layout/TableOfContents.astro +68 -0
  182. package/src/components/layout/analytics-client.ts +38 -0
  183. package/src/components/layout/head-scripts.ts +19 -0
  184. package/src/components/layout/nav-utils.ts +87 -0
  185. package/src/components/layout/overrides.ts +32 -0
  186. package/src/components/layout/search/algolia.ts +43 -0
  187. package/src/components/layout/search/endpoint.ts +22 -0
  188. package/src/components/layout/search/flexsearch.ts +52 -0
  189. package/src/components/layout/search/orama-cloud.ts +41 -0
  190. package/src/components/layout/search/orama.ts +26 -0
  191. package/src/components/layout/search/pagefind.ts +43 -0
  192. package/src/components/layout/search/types.ts +163 -0
  193. package/src/components/layout/search/typesense.ts +60 -0
  194. package/src/components/layout/toc-element.ts +108 -0
  195. package/src/core/bridge.ts +92 -0
  196. package/src/core/config.ts +112 -0
  197. package/src/core/content.ts +50 -0
  198. package/src/core/data.ts +128 -0
  199. package/src/core/define-components.ts +34 -0
  200. package/src/core/define-meta.ts +20 -0
  201. package/src/core/deployment-env.ts +73 -0
  202. package/src/core/diagnostics.ts +104 -0
  203. package/src/core/frontmatter.ts +43 -0
  204. package/src/core/graph.ts +128 -0
  205. package/src/core/i18n-ui.ts +171 -0
  206. package/src/core/i18n.ts +169 -0
  207. package/src/core/last-modified.ts +88 -0
  208. package/src/core/links.ts +352 -0
  209. package/src/core/load-module.ts +15 -0
  210. package/src/core/manifest.ts +126 -0
  211. package/src/core/meta.ts +97 -0
  212. package/src/core/navigation.ts +392 -0
  213. package/src/core/package-root.ts +37 -0
  214. package/src/core/project-graph.ts +153 -0
  215. package/src/core/project.ts +56 -0
  216. package/src/core/schema.ts +1057 -0
  217. package/src/core/server-features.ts +23 -0
  218. package/src/core/sources/assets.ts +77 -0
  219. package/src/core/sources/cache.ts +122 -0
  220. package/src/core/sources/filesystem.ts +99 -0
  221. package/src/core/sources/mdx-remote.ts +215 -0
  222. package/src/core/sources/mintlify.ts +161 -0
  223. package/src/core/sources/normalize.ts +243 -0
  224. package/src/core/sources/notion.ts +440 -0
  225. package/src/core/sources/portable-text.ts +143 -0
  226. package/src/core/sources/read.ts +36 -0
  227. package/src/core/sources/resolve.ts +158 -0
  228. package/src/core/sources/sanity.ts +218 -0
  229. package/src/core/sources/types.ts +105 -0
  230. package/src/core/tsconfig-aliases.ts +201 -0
  231. package/src/core/types.ts +261 -0
  232. package/src/core/ui-packs/ar.ts +47 -0
  233. package/src/core/ui-packs/bg.ts +47 -0
  234. package/src/core/ui-packs/bn.ts +47 -0
  235. package/src/core/ui-packs/ca.ts +47 -0
  236. package/src/core/ui-packs/cs.ts +47 -0
  237. package/src/core/ui-packs/da.ts +47 -0
  238. package/src/core/ui-packs/de.ts +47 -0
  239. package/src/core/ui-packs/el.ts +47 -0
  240. package/src/core/ui-packs/es.ts +47 -0
  241. package/src/core/ui-packs/fa.ts +47 -0
  242. package/src/core/ui-packs/fi.ts +47 -0
  243. package/src/core/ui-packs/fr.ts +47 -0
  244. package/src/core/ui-packs/he.ts +47 -0
  245. package/src/core/ui-packs/hi.ts +47 -0
  246. package/src/core/ui-packs/hr.ts +47 -0
  247. package/src/core/ui-packs/hu.ts +47 -0
  248. package/src/core/ui-packs/id.ts +47 -0
  249. package/src/core/ui-packs/index.ts +87 -0
  250. package/src/core/ui-packs/it.ts +47 -0
  251. package/src/core/ui-packs/ja.ts +47 -0
  252. package/src/core/ui-packs/ko.ts +47 -0
  253. package/src/core/ui-packs/nl.ts +47 -0
  254. package/src/core/ui-packs/no.ts +47 -0
  255. package/src/core/ui-packs/pl.ts +47 -0
  256. package/src/core/ui-packs/pt-br.ts +47 -0
  257. package/src/core/ui-packs/pt.ts +47 -0
  258. package/src/core/ui-packs/ro.ts +47 -0
  259. package/src/core/ui-packs/ru.ts +47 -0
  260. package/src/core/ui-packs/sk.ts +47 -0
  261. package/src/core/ui-packs/sr.ts +47 -0
  262. package/src/core/ui-packs/sv.ts +47 -0
  263. package/src/core/ui-packs/th.ts +47 -0
  264. package/src/core/ui-packs/tr.ts +47 -0
  265. package/src/core/ui-packs/uk.ts +47 -0
  266. package/src/core/ui-packs/vi.ts +47 -0
  267. package/src/core/ui-packs/zh-tw.ts +47 -0
  268. package/src/core/ui-packs/zh.ts +47 -0
  269. package/src/core/version.ts +23 -0
  270. package/src/deploy/robots.ts +20 -0
  271. package/src/deploy/rss.ts +128 -0
  272. package/src/deploy/sitemap.ts +28 -0
  273. package/src/index.ts +39 -0
  274. package/src/markdown/code-title.ts +71 -0
  275. package/src/markdown/directives.ts +83 -0
  276. package/src/markdown/heading-anchors.ts +137 -0
  277. package/src/markdown/index.ts +228 -0
  278. package/src/markdown/inline-code.ts +108 -0
  279. package/src/markdown/language-icon.ts +172 -0
  280. package/src/markdown/math.ts +32 -0
  281. package/src/markdown/mdast.ts +48 -0
  282. package/src/markdown/mermaid.ts +37 -0
  283. package/src/markdown/package-commands.ts +159 -0
  284. package/src/markdown/package-install.ts +40 -0
  285. package/src/migrate/fumadocs/config.ts +155 -0
  286. package/src/migrate/fumadocs/content.ts +365 -0
  287. package/src/migrate/fumadocs/frontmatter.ts +18 -0
  288. package/src/migrate/fumadocs/groups.ts +230 -0
  289. package/src/migrate/fumadocs/index.ts +337 -0
  290. package/src/migrate/fumadocs/meta.ts +244 -0
  291. package/src/migrate/migrate.ts +53 -0
  292. package/src/migrate/mintlify/config.ts +1040 -0
  293. package/src/migrate/mintlify/content.ts +98 -0
  294. package/src/migrate/mintlify/frontmatter.ts +126 -0
  295. package/src/migrate/mintlify/i18n.ts +51 -0
  296. package/src/migrate/mintlify/icons.ts +128 -0
  297. package/src/migrate/mintlify/index.ts +266 -0
  298. package/src/migrate/mintlify/snippets.ts +306 -0
  299. package/src/migrate/mintlify/transform.ts +80 -0
  300. package/src/migrate/nextra/content.ts +46 -0
  301. package/src/migrate/nextra/frontmatter.ts +40 -0
  302. package/src/migrate/nextra/index.ts +374 -0
  303. package/src/migrate/nextra/meta.ts +266 -0
  304. package/src/migrate/shared.ts +720 -0
  305. package/src/migrate/starlight/config.ts +459 -0
  306. package/src/migrate/starlight/content.ts +78 -0
  307. package/src/migrate/starlight/frontmatter.ts +111 -0
  308. package/src/migrate/starlight/i18n.ts +54 -0
  309. package/src/migrate/starlight/index.ts +131 -0
  310. package/src/og/card.ts +92 -0
  311. package/src/og/index.ts +2 -0
  312. package/src/openapi/scalar.ts +246 -0
  313. package/src/registry/eject.ts +310 -0
  314. package/src/registry/registry.ts +100 -0
  315. package/src/registry/rewrite-imports.ts +39 -0
  316. package/src/runtime/index.ts +14 -0
  317. package/src/search/build.ts +23 -0
  318. package/src/search/documents.ts +164 -0
  319. package/src/search/orama-index.ts +66 -0
  320. package/src/search/providers.ts +91 -0
  321. package/src/search/sync/algolia.ts +30 -0
  322. package/src/search/sync/index.ts +50 -0
  323. package/src/search/sync/orama-cloud.ts +40 -0
  324. package/src/search/sync/typesense.ts +65 -0
  325. package/src/seo/jsonld.ts +113 -0
  326. package/src/theme/entry.ts +637 -0
  327. package/src/theme/fonts.ts +198 -0
  328. package/src/theme/icons.ts +184 -0
  329. package/src/theme/palette.ts +143 -0
  330. package/src/theme/twoslash.ts +81 -0
@@ -0,0 +1,98 @@
1
+ ---
2
+ title: Analytics
3
+ description: First-party web analytics — Vercel Web Analytics, PostHog, or any custom script — wired up from blume.config.ts.
4
+ ---
5
+
6
+ Blume injects analytics for you from a single `analytics` block in
7
+ `blume.config.ts`. Vercel Web Analytics and PostHog are first-class, and a
8
+ `scripts` escape hatch covers every other provider — Plausible, Fathom, Google
9
+ Analytics, Umami, and the rest.
10
+
11
+ Analytics loads in **production builds only**. The scripts are emitted by
12
+ `blume build`, never by `blume dev`, so local traffic never reaches your
13
+ dashboards and you don't need a separate "development" project.
14
+
15
+ :::note
16
+ Analytics is opt-in. With no `analytics` block, Blume injects nothing.
17
+ :::
18
+
19
+ ## Vercel Web Analytics
20
+
21
+ Set `vercel: true` to add [Vercel Web Analytics](https://vercel.com/docs/analytics).
22
+ Blume injects Vercel's first-party script, which is served from your own domain
23
+ once Web Analytics is enabled for the project in the Vercel dashboard.
24
+
25
+ ```ts blume.config.ts lineNumbers
26
+ analytics: {
27
+ vercel: true,
28
+ }
29
+ ```
30
+
31
+ No keys are needed — the script reports to the project it's deployed under. This
32
+ only collects data on Vercel deployments, where the `/_vercel/insights` endpoint
33
+ exists.
34
+
35
+ ## PostHog
36
+
37
+ Provide your **project API key** to add [PostHog](https://posthog.com). The host
38
+ defaults to PostHog Cloud US; set `host` for EU Cloud
39
+ (`https://eu.i.posthog.com`) or a self-hosted instance.
40
+
41
+ ```ts blume.config.ts lineNumbers
42
+ analytics: {
43
+ posthog: {
44
+ key: "phc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
45
+ host: "https://us.i.posthog.com", // optional, this is the default
46
+ },
47
+ }
48
+ ```
49
+
50
+ The project API key is safe to ship to the browser — it's a public,
51
+ write-only key.
52
+
53
+ ## Custom scripts
54
+
55
+ Use `scripts` to load any other analytics provider. Each entry renders one
56
+ `<script>` tag and must set **exactly one** of `src` (external) or `content`
57
+ (inline).
58
+
59
+ ```ts blume.config.ts lineNumbers
60
+ analytics: {
61
+ scripts: [
62
+ // Plausible
63
+ {
64
+ src: "https://plausible.io/js/script.js",
65
+ strategy: "defer",
66
+ attributes: { "data-domain": "example.com" },
67
+ },
68
+ // Fathom
69
+ {
70
+ src: "https://cdn.usefathom.com/script.js",
71
+ strategy: "defer",
72
+ attributes: { "data-site": "ABCDEFG" },
73
+ },
74
+ // An inline snippet
75
+ {
76
+ content: "console.log('analytics ready')",
77
+ },
78
+ ],
79
+ }
80
+ ```
81
+
82
+ `attributes` is a map of extra HTML attributes (`data-*`, `id`, …) spread onto
83
+ the tag, and `strategy` adds `async` or `defer` to external scripts.
84
+
85
+ ## Options
86
+
87
+ | Option | Default | Description |
88
+ | ---------------------- | -------------------------- | ------------------------------------------------------- |
89
+ | `vercel` | `false` | Add Vercel Web Analytics (Vercel deployments only). |
90
+ | `posthog.key` | — | PostHog project API key. Enables PostHog when set. |
91
+ | `posthog.host` | `https://us.i.posthog.com` | PostHog ingestion host (EU Cloud or self-hosted). |
92
+ | `scripts[].src` | — | External script URL. Mutually exclusive with `content`. |
93
+ | `scripts[].content` | — | Inline script body. Mutually exclusive with `src`. |
94
+ | `scripts[].strategy` | — | `async` or `defer` for an external script. |
95
+ | `scripts[].attributes` | — | Extra HTML attributes spread onto the `<script>` tag. |
96
+
97
+ All three can be combined — enable Vercel, PostHog, and custom scripts together.
98
+ For deploying your built site, see [Deployment](/docs/deployment).
@@ -0,0 +1,91 @@
1
+ ---
2
+ title: Customization
3
+ description: Override components, add interactive islands, mount custom pages, install registry components, or eject.
4
+ ---
5
+
6
+ ## Component overrides
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.
11
+
12
+ ```ts components.ts lineNumbers
13
+ import { defineComponents } from "blume";
14
+ import Callout from "./components/Callout.astro";
15
+ import Pricing from "./components/Pricing.astro";
16
+
17
+ export default defineComponents({
18
+ mdx: {
19
+ Callout, // replace the built-in Callout
20
+ Pricing, // add a new <Pricing /> component
21
+ },
22
+ });
23
+ ```
24
+
25
+ Keys are the names you write in MDX (`<Callout>`, `<Pricing>`). Use the `.tsx`
26
+ filename when you import React components.
27
+
28
+ ## Interactive islands
29
+
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:
33
+
34
+ ```tsx islands/Counter.tsx lineNumbers
35
+ import { useState } from "react";
36
+
37
+ export default function Counter() {
38
+ const [n, setN] = useState(0);
39
+ return <button onClick={() => setN(n + 1)}>Clicked {n}</button>;
40
+ }
41
+ ```
42
+
43
+ ```mdx page.mdx
44
+ Use it anywhere: <Counter />
45
+ ```
46
+
47
+ See [Islands](/docs/content/islands) for hydration strategies and framework
48
+ setup.
49
+
50
+ ## Custom pages
51
+
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.
56
+
57
+ See [Custom Pages](/docs/advanced/custom-pages) for the full guide.
58
+
59
+ ## Registry
60
+
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:
64
+
65
+ ```bash
66
+ blume add
67
+ ```
68
+
69
+ Install a widget, or any built-in layout slot you want to customize — the
70
+ header, sidebar, breadcrumbs, table of contents, or pagination:
71
+
72
+ ```bash
73
+ blume add pagination
74
+ ```
75
+
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.
79
+
80
+ ## Eject
81
+
82
+ When you want full control, eject the generated runtime into a standalone Astro
83
+ project:
84
+
85
+ ```bash
86
+ blume eject --yes
87
+ ```
88
+
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.
@@ -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,290 @@
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
+ ### Apple touch icon
141
+
142
+ The icon iOS uses when someone adds your site to their home screen is detected
143
+ the same way. Drop an `apple-icon` file (`.png`, `.jpg`, or `.jpeg`) — or an
144
+ `apple-touch-icon.png`, the name most favicon generators emit — in your project
145
+ root or `public/` directory and Blume wires up `<link rel="apple-touch-icon">`
146
+ for you. There's no default; if no file is found, no tag is emitted.
147
+
148
+ ```
149
+ my-docs/
150
+ ├─ blume.config.ts
151
+ ├─ apple-icon.png ← picked up automatically
152
+ └─ docs/
153
+ ```
154
+
155
+ Put the file in `public/` rather than the project root: iOS ignores the inlined
156
+ data URI Blume uses for a root-level icon, so only a `public/` file (served at
157
+ `/apple-icon.png`) reliably reaches the home screen.
158
+
159
+ ### Banner
160
+
161
+ Show a site-wide announcement bar above the header. Pass a string, or an object
162
+ with a link and a dismiss button:
163
+
164
+ ```ts blume.config.ts
165
+ banner: "Docs are in beta — expect changes.",
166
+ ```
167
+
168
+ ```ts blume.config.ts lineNumbers
169
+ banner: {
170
+ content: "Blume v1 is here!",
171
+ link: { text: "Read more", href: "/blog/v1" },
172
+ dismissible: true,
173
+ id: "v1",
174
+ },
175
+ ```
176
+
177
+ When `dismissible` is on, the bar shows a close button and stays hidden for that
178
+ visitor afterward. The dismissal key defaults to the content text, so editing
179
+ the message brings the banner back; set a stable `id` to keep it dismissed
180
+ across edits.
181
+
182
+ ## Content
183
+
184
+ Where your content lives and how Blume discovers it. See [Pages](/docs/content) for
185
+ how files become routes.
186
+
187
+ ```ts blume.config.ts lineNumbers
188
+ content: {
189
+ root: "docs",
190
+ }
191
+ ```
192
+
193
+ | Option | Default | Description |
194
+ | ------------- | -------------------- | -------------------------------------------- |
195
+ | `root` | `"docs"` | Folder Blume scans for content. |
196
+ | `include` | `["**/*.{md,mdx}"]` | Globs that match content files. |
197
+ | `exclude` | `["**/_*", "**/.*"]` | Globs to ignore (underscore- and dot-files). |
198
+ | `pages` | `"pages"` | Folder for custom `.astro` pages. |
199
+ | `defaultType` | `"doc"` | Page `type` used when frontmatter omits it. |
200
+
201
+ ## Last modified
202
+
203
+ Show a "Last updated on …" line at the bottom of each page. Off by default; set
204
+ `lastModified` to `true` to derive each page's date from its git history:
205
+
206
+ ```ts blume.config.ts
207
+ lastModified: true,
208
+ ```
209
+
210
+ | Value | Description |
211
+ | ------------------------- | -------------------------------------------------------------- |
212
+ | `false` | Disabled (default). |
213
+ | `true` | Read the date from git history (commit dates). |
214
+ | `{ type: "git" }` | Same as `true`, written explicitly. |
215
+ | `{ type: "frontmatter" }` | Never run git — use only the `lastModified` frontmatter field. |
216
+
217
+ The git source reads the most recent commit that touched each file, so it works
218
+ in any git repository — including monorepos — and needs the repo's history at
219
+ build time (avoid a shallow `--depth 1` checkout in CI). A page's own
220
+ `lastModified` frontmatter always wins, which is handy for pinning a date or for
221
+ files that aren't committed yet:
222
+
223
+ ```mdx page.mdx
224
+ ---
225
+ title: My page
226
+ lastModified: 2026-06-20
227
+ ---
228
+ ```
229
+
230
+ When enabled, the date is also emitted as schema.org `dateModified` in the
231
+ page's structured data.
232
+
233
+ ## SEO
234
+
235
+ Open Graph images, RSS feeds, and JSON-LD structured data, grouped under `seo`.
236
+ See the [SEO guide](/docs/configuration/seo) for metadata, frontmatter overrides, and
237
+ the full reference.
238
+
239
+ ```ts blume.config.ts lineNumbers
240
+ seo: {
241
+ og: { enabled: false },
242
+ rss: { enabled: true, types: ["blog", "changelog"] },
243
+ sitemap: true,
244
+ robots: true,
245
+ structuredData: true,
246
+ }
247
+ ```
248
+
249
+ | Option | Default | Description |
250
+ | ---------------- | ----------------------- | --------------------------------------------- |
251
+ | `og.enabled` | `false` | Generate per-page Open Graph images. |
252
+ | `rss.enabled` | `true` | Build feeds for blog and changelog content. |
253
+ | `rss.types` | `["blog", "changelog"]` | Content types that each get a feed. |
254
+ | `rss.limit` | `50` | Maximum items per feed. |
255
+ | `sitemap` | `true` | Generate sitemap.xml (needs deployment.site). |
256
+ | `robots` | `true` | Generate robots.txt with a Sitemap link. |
257
+ | `structuredData` | `true` | Emit schema.org JSON-LD in each page's head. |
258
+
259
+ These work best with an absolute [`deployment.site`](/docs/deployment) for full URLs.
260
+
261
+ ## Feature options
262
+
263
+ Each of these has its own guide. The config field is the entry point:
264
+
265
+ | Field | What it configures | Guide |
266
+ | ------------ | --------------------------------------------------- | ------------------------------------------ |
267
+ | `theme` | Accent color, corner radius, fonts, light/dark mode | [Theming](/docs/configuration/theming) |
268
+ | `navigation` | Explicit sidebar and header tabs | [Navigation](/docs/content/navigation) |
269
+ | `search` | Provider (Orama or Pagefind) and indexing | [Search](/docs/configuration/search) |
270
+ | `markdown` | Opt-in Markdown features like math | [Syntax](/docs/content/syntax) |
271
+ | `ai` | `llms.txt`, Ask AI, and the MCP server | [AI](/docs/configuration/ai) |
272
+ | `mcp` | Hosted MCP server for coding agents | [AI](/docs/configuration/ai#mcp-server) |
273
+ | `analytics` | Vercel, PostHog, and custom scripts | [Analytics](/docs/configuration/analytics) |
274
+ | `seo` | Metadata, OG images, feeds, structured data | [SEO](/docs/configuration/seo) |
275
+ | `deployment` | Output mode, adapter, and site URL | [Deployment](/docs/deployment) |
276
+ | `redirects` | Permanent and temporary redirects | [Deployment](/docs/deployment#redirects) |
277
+
278
+ ## Precedence
279
+
280
+ Settings resolve from lowest to highest priority, so you only override what you
281
+ need:
282
+
283
+ <Steps>
284
+ <Step title="Blume defaults">A sensible default for every field.</Step>
285
+ <Step title="blume.config.ts">Your project-wide configuration.</Step>
286
+ <Step title="Folder meta">
287
+ [`meta.ts`](/docs/content/meta) for a section's title and ordering.
288
+ </Step>
289
+ <Step title="Page frontmatter">Per-page overrides win.</Step>
290
+ </Steps>
@@ -0,0 +1,15 @@
1
+ import { defineMeta } from "blume";
2
+
3
+ export default defineMeta({
4
+ order: 4,
5
+ pages: [
6
+ "theming",
7
+ "customization",
8
+ "search",
9
+ "ai",
10
+ "analytics",
11
+ "export",
12
+ "seo",
13
+ ],
14
+ title: "Configuration",
15
+ });