blume 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/cli/index.js +308 -50
- package/dist/cli/index.js.map +29 -24
- package/dist/types/ai/component-markdown.d.ts +14 -0
- package/dist/types/core/config-input.d.ts +10 -0
- package/dist/types/core/schema.d.ts +4 -1
- package/docs/01-quickstart.mdx +2 -2
- package/docs/02-deployment.mdx +5 -5
- package/docs/{07-faq.mdx → 08-faq.mdx} +7 -7
- package/docs/advanced/blog.mdx +3 -3
- package/docs/advanced/changelog.mdx +2 -2
- package/docs/advanced/custom-pages.mdx +4 -4
- package/docs/advanced/meta.ts +1 -1
- package/docs/configuration/analytics.mdx +21 -2
- package/docs/configuration/ask-ai.mdx +179 -0
- package/docs/configuration/index.mdx +8 -7
- package/docs/configuration/meta.ts +1 -2
- package/docs/configuration/search.mdx +1 -1
- package/docs/configuration/theming.mdx +1 -1
- package/docs/content/i18n.mdx +7 -1
- package/docs/content/index.mdx +1 -1
- package/docs/content/navigation.mdx +2 -2
- package/docs/content/syntax.mdx +2 -2
- package/docs/discoverability/agent-discovery.mdx +196 -0
- package/docs/discoverability/index.mdx +48 -0
- package/docs/discoverability/json-api.mdx +58 -0
- package/docs/discoverability/llms-txt.mdx +68 -0
- package/docs/discoverability/markdown.mdx +76 -0
- package/docs/discoverability/mcp.mdx +64 -0
- package/docs/discoverability/meta.ts +18 -0
- package/docs/discoverability/metadata.mdx +82 -0
- package/docs/discoverability/open-graph.mdx +113 -0
- package/docs/discoverability/rss.mdx +24 -0
- package/docs/discoverability/sitemap-and-robots.mdx +95 -0
- package/docs/discoverability/structured-data.mdx +51 -0
- package/docs/index.mdx +5 -5
- package/docs/reference/eval.mdx +1 -1
- package/docs/reference/meta.ts +1 -1
- package/docs/reference/translate.mdx +1 -0
- package/package.json +27 -27
- package/src/ai/component-markdown.ts +17 -2
- package/src/ai/llms.ts +3 -10
- package/src/ai/markdown.ts +3 -10
- package/src/ai/openapi-components.ts +123 -0
- package/src/ai/serializers.ts +24 -0
- package/src/astro/generate.ts +5 -6
- package/src/astro/templates.ts +42 -12
- package/src/audit/checks/links.ts +1 -8
- package/src/audit/checks/llms.ts +5 -4
- package/src/audit/redirects.ts +4 -3
- package/src/audit/run.ts +6 -8
- package/src/audit/url.ts +33 -0
- package/src/cli/commands/validate.ts +1 -0
- package/src/components/content/Component.astro +60 -59
- package/src/components/content/example-pane.ts +6 -0
- package/src/components/content/mermaid-element.ts +8 -0
- package/src/components/layout/Analytics.astro +20 -1
- package/src/components/layout/LocaleLinks.astro +42 -0
- package/src/components/layout/PageLayout.astro +5 -3
- package/src/components/layout/ReferenceLayout.astro +6 -0
- package/src/components/layout/RootLayout.astro +6 -3
- package/src/components/layout/analytics-client.ts +2 -1
- package/src/components/layout/search-locale.ts +13 -0
- package/src/components/openapi/ApiOverview.astro +7 -39
- package/src/components/openapi/ApiTagOperations.astro +2 -1
- package/src/components/openapi/AsyncApiOperation.astro +8 -5
- package/src/components/openapi/Authorization.astro +4 -6
- package/src/components/openapi/Bindings.astro +2 -2
- package/src/components/openapi/Description.astro +109 -0
- package/src/components/openapi/GraphqlFieldsTable.astro +5 -7
- package/src/components/openapi/GraphqlOperation.astro +7 -5
- package/src/components/openapi/GraphqlType.astro +4 -6
- package/src/components/openapi/Operation.astro +3 -2
- package/src/components/openapi/ParametersTable.astro +5 -7
- package/src/components/openapi/RequestBody.astro +2 -4
- package/src/components/openapi/Responses.astro +4 -3
- package/src/components/openapi/SchemaProperty.astro +11 -6
- package/src/components/openapi/description.ts +91 -0
- package/src/core/config-input.ts +10 -0
- package/src/core/i18n.ts +13 -2
- package/src/core/links.ts +33 -1
- package/src/core/locale-links.ts +163 -0
- package/src/core/schema.ts +8 -0
- package/src/core/sources/normalize.ts +57 -7
- package/src/markdown/package-commands.ts +27 -3
- package/src/openapi/graphql.ts +29 -0
- package/src/openapi/model.ts +69 -0
- package/src/openapi/render-mdx.ts +3 -2
- package/src/openapi/signature.ts +18 -0
- package/src/search/documents.ts +4 -9
- package/src/theme/entry.ts +28 -4
- package/src/translate/anchors.ts +91 -0
- package/src/translate/validate.ts +8 -3
- package/docs/configuration/ai.mdx +0 -613
- package/docs/configuration/seo.mdx +0 -364
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# blume
|
|
2
2
|
|
|
3
|
+
## 1.6.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9753355: Render a spec `description` as the Markdown it is. An OpenAPI description is Markdown by specification, but schema properties, parameters, request bodies, responses, authorization schemes, AsyncAPI messages and every GraphQL description — field, enum value and operation return type — printed it as plain text — so a spec generated from code docstrings showed its own `**asterisks**` and backticks, a numbered list rendered as one long line, and because HTML collapses newlines every paragraph ran together into a single wall of text. The operation description on the same page never had this problem, because it is emitted into the MDX body and goes through the full pipeline; the two rendered side by side is what made it obvious. Descriptions now render through `marked` — synchronous, already a dependency, and already how the Ask AI island renders model Markdown — since the full pipeline is async and built for whole documents while these are thousands of short strings per build.
|
|
8
|
+
|
|
9
|
+
Only a link the author clearly meant becomes an anchor: written as a link, to an absolute URL, a root-relative path, a fragment or a `mailto:`. Everything else keeps its raw source text, because a description is often prose that was never Markdown. GFM autolinks bare URLs, `www.` hosts and email addresses, and spec descriptions are full of example hosts (`https://myorg.my.salesforce.com`, `www.yourstore.myshopify.com`) that turned into links to hosts nobody should visit; worse, regex and format notation reads as link syntax — Debezium's column-list wording `schemaName[.]tableName[.](columnName1|columnName2)` is literally `[text](href)`, which both produced a broken link and deleted the notation, since the link text is only `.`. An image is held to the same policy. Raw HTML is escaped rather than passed through, for the same reason the Ask AI island runs its Markdown through DOMPurify: this is data lifted out of a file and interpolated into the page.
|
|
10
|
+
|
|
11
|
+
A GFM table in a description is wrapped in the same scroll frame the body pipeline gives every other table, because `set:html` bypasses the plugin that would have done it and a description sits in a narrower column than the body.
|
|
12
|
+
|
|
13
|
+
Styling lives in one style block on a single class rather than in per-element utilities. Written as utilities it repeated the same ~620 characters on every description, which on a large reference page is 1.5 MB of identical class attributes and enough to push pages past Googlebot's 2 MB crawl limit; `blume audit` flags that as an indexability error.
|
|
14
|
+
- dd32b7b: Add `analytics.cloudflare` for Cloudflare Web Analytics. Pass the site token from the dashboard's JS snippet — `analytics: { cloudflare: { token } }` — and Blume renders the beacon tag, the same way `posthog` takes a key. Until now the beacon meant hand-writing a `scripts` entry with the beacon URL and a JSON `data-cf-beacon` attribute.
|
|
15
|
+
|
|
16
|
+
This is for sites Cloudflare doesn't proxy. A proxied zone with automatic Web Analytics on already injects the beacon at the edge and should leave the option unset, or every pageview is counted twice; the analytics docs now spell out that distinction.
|
|
17
|
+
- 597d824: Give a reference row room for what it holds. The row was scaled for a one-line description — 4px between the property name and its description, 8px before the disclosure, 12px of row padding — but a description is a block, so at 4px it sat closer to the label above it than its own paragraphs sat to each other. That inversion is what made a dense reference page read as a wall rather than as rows, and the disclosure below it touched the next row's divider. Every component that draws a reference row now shares one scale: 8px between a row's own lines, 12px before a disclosure, 16px of row padding. Measured on one operation page, the gap between two properties goes from 25px to 33px.
|
|
18
|
+
|
|
19
|
+
Table cells gain the same treatment for the same reason. At 0.5rem of block padding against a line-height near 1.7, a cell whose content wrapped put more space between its own two lines than between itself and the next row. The inline padding is unchanged on purpose: widening it comes out of column width in a capped article, and on one corpus it pushed cells that fit on two lines onto three, spending the space it had just bought.
|
|
20
|
+
- b03b43f: Update dependencies: Mermaid 12, React 19.3, Zod 4.6, `ai` 7.0.99, `@pierre/diffs` 1.4.2, and the latest patch releases of the remaining runtime dependencies. Mermaid 12 makes the ELK layout and the "neo" look its defaults; Blume pins the previous dagre layout and classic look so existing diagrams render as before and the ELK engine only downloads for diagrams that opt in through their own front matter.
|
|
21
|
+
|
|
22
|
+
## 1.6.4
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 623fe85: Remove the extra vertical space at the bottom of code blocks. The scrolling code element carries a small bottom inset so a horizontal scrollbar thumb stays off the last line's descenders, but that inset was added on top of the block's padding, so every block, including a one-line install command, sat 0.375rem taller than the space above the text. The block now gives up the same amount below the code element, so the text sits an even 1rem from the top and bottom edges and the scrollbar gap is unchanged.
|
|
27
|
+
- 6edd17b: Fix a `ReferenceError: rafThrottle is not defined` thrown on pages that render `<Component>`: the script block used `rafThrottle` without importing it. Preview panes now cap at the viewport with CSS (`max-height: 100lvh`) instead of a resize listener, so a pane capped by a small window grows back when the window does, mobile toolbar collapse no longer resizes it, and the docs page asks already-loaded frames to re-report their height so a report sent before the listener registered isn't lost.
|
|
28
|
+
- ec879ad: Keep content links inside the reader's language on multi-locale sites. Markdown links and `Card`, `Tile`, `Tooltip`, and `Update` hrefs written as `/guides/setup` rendered verbatim on translated pages, so a reader on `/fr/…` was sent back to the default locale on the first click. Root-relative page links now resolve to the same-locale route when one is served — a translation or a fallback page — and keep their authored target otherwise, so custom pages and explicit cross-locale links are untouched. `blume check` resolves links the same way, so an anchor is validated against the translated page a reader actually lands on.
|
|
29
|
+
|
|
30
|
+
Because anchors now travel with the link, `blume translate` pins every translated heading to its source heading's anchor id with a trailing `[#id]` marker (unless the translation already pins one), so `#fragment` links resolve identically in every language.
|
|
31
|
+
- 5efd05e: Fix the language switcher's fallback target under a `basePath`. A switcher entry for a locale with no real translation derives its href by stripping the page's own locale from its route and re-adding the target locale, but `route` arrives with the base path already applied (`/docs/ja/reference`) while locale prefixes are base-less (`/ja`) — so the strip matched nothing and the re-add produced a second prefix, linking `/docs/ja/reference` at `/ja/docs/ja/reference`, `/ko/docs/ja/reference` and so on. None of those routes are built, so every affected entry was a dead link, and an audit that follows them reported the page as linking to broken routes. The route is now moved into base-less space before the locale is swapped and the base is re-applied to the result, using the same helpers the manifest composes real routes with. This affects any locale without a real translation of the page: a partially translated hand-written page for its missing locales, and, most visibly, a generated OpenAPI or GraphQL reference under a base path for every locale but its own.
|
|
32
|
+
- 4de1d37: Downlevel `<Operation>`, `<ApiTagOperations>` and `<ApiOverview>` on the agent-facing surfaces. A generated reference page is its description as Markdown plus one of those components, so with no serializer for them an operation page reached `/<route>.md`, `llms-full.txt`, MCP `get_page` and the Ask AI corpus as its description followed by a bare tag — no method, no path, nowhere to go. On a site whose reference is most of the corpus, that is most of the corpus: measured on one 449-page site, 266 pages and 266 raw `<Operation>` in `llms-full.txt`, so "which endpoint do I call?" had no answer anywhere an agent could read. An operation now downlevels to its endpoint in the spec kind's own notation — `GET /pets/{id}`, `SEND user/signup`, `query pets` or `type Pet` — plus a deprecation marker; a tag section to its operations as links with their summaries; and the overview to the version and base URLs the rendered page shows. Site search indexes the same text, so a query for an endpoint's path now matches its page. Parameters and schemas stay with the component, which owns that rendering. The components and the serializers also share one own-property lookup, so a `source` or `id` that names an inherited property like `toString` renders the not-found state instead of throwing.
|
|
33
|
+
- 830bd4e: Update the oxfmt directive-preservation patch documented in the FAQ for oxfmt 0.67.0. The patch body is unchanged; it now targets the renamed Markdown formatter chunk so `:::` container directives keep their fences on their own lines under the latest oxfmt, oxlint 1.82, and Ultracite 7.11.
|
|
34
|
+
- a919bac: Add `nub` and `aube` tabs to the `package-install` block, alongside npm, pnpm, yarn, and bun. The commands come from the same maintained agent tables as the existing tabs, so `npx …` becomes `nubx …` and `aube dlx …`, `npm ci` becomes a frozen install, and global installs keep their `-g` form. An install block may also be written with a `nub`, `nubx`, or `aube` command as its input.
|
|
35
|
+
- ecbb199: Stop the llms.txt audit reporting the MCP route as a stale entry. `llms.txt` advertises `ai.mcp.route` whenever the MCP server is on, but that endpoint is streamable HTTP — a route the server answers, not a file the build writes — so it appears in neither the page snapshots nor the static file index and the stale-entry check read the site's own index as broken. Every server-output site with `ai.mcp` enabled raised `BLUME_AUDIT_LLMS_TXT_STALE_ENTRY` for a file that was never meant to exist, and under `--fail-on warning` that failed the audit and blocked publishing. The configured route is now exempt while the server is enabled, and only then: with `ai.mcp` off, a listed `/mcp` is as stale as any other dead entry. The other targets llms.txt lists — `llms-full.txt`, `/index.md`, `agent-readability.json`, `sitemap.xml` — are real files and are unaffected.
|
|
36
|
+
|
|
37
|
+
The link, llms.txt, and redirect checks now share one definition of what the build serves, so a page link or a configured redirect that lands on the MCP route is no longer reported as broken either, and an llms.txt entry that points at a directory served from its `index.html` is accepted the way the link check already did.
|
|
38
|
+
- bbb6792: Scope search to the active language on every page of a multi-locale site. The search dialog derived its locale filter from the header's language-switcher entries, which only content pages receive, so custom pages built on `PageLayout`, the changelog index, the 404 page, and the API reference shell searched every language and hid the "All languages" toggle. The filter now reads the resolved i18n settings directly.
|
|
39
|
+
- d7462bf: Update dependencies: Astro 7.3.2 with `@astrojs/mdx` 8.0.1 and `@astrojs/markdown-satteri` 0.4.1, plus the latest patch releases of the remaining runtime dependencies (`@clack/prompts`, `@scalar/astro`, `ai`, `dompurify`, `katex`, `marked`, `node-html-parser`, `simple-icons`, `takumi-js`). Astro's default image service already resolves to Sharp 0.35.4, the release that patches the AVIF remote code execution advisory (GHSA-26w7-cxv4-gfx2).
|
|
40
|
+
|
|
3
41
|
## 1.6.3
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|