Boltdocs 2.9.0 — DUI, Feedback, Math, and a Lot of Polish

Jesús AlcaláJesús Alcalá
Boltdocs 2.9.0 — DUI, Feedback, Math, and a Lot of Polish

2.9.0 ships the DUI toolkit as a standalone package, native feedback support, a proper math plugin with KaTeX, the transformSource lifecycle hook, CLI flags for dev, a long list of bug fixes, and a brand-new image optimizer.

This one's about sharingLink

2.8.0 was about scale — code splitting, budgets, strict types. 2.9.0 is about taking the pieces I built and pushing them further out into the world.

Info
Note

DUI is now its own package, feedback works out of the box, math looks beautiful with KaTeX, the plugin API has a new transformSource hook, dev gets CLI flags, and I finally squashed that theme flash that's been annoying me for months.


DUI Goes IndependentLink

I built @bdocs/dui as an internal toolkit for Boltdocs' CLI — colored output, spinners, tables, progress bars, the usual terminal UI stuff. But the more I used it, the more I thought: why keep this to myself?

So I split it into its own repository — bolt-docs/dui — with a proper API, documentation, and a live playground at dui-terms.vercel.app. Anyone can use it now, not just Boltdocs. Better API surface, better types, better everything.

And yeah — it's still the fastest terminal UI library out there. Boltdocs just tends to make everything faster.


Native Feedback SupportLink

I wanted a way for readers to tell me when something's wrong — or when it's right. So I built a feedback system directly into Boltdocs.

Drop the config in and every page gets a thumbs up/down widget. It works in two modes:

  • Dev/Preview: a Vite middleware intercepts POST requests to /api/feedback — zero setup
  • Production: deploy a serverless function using the handleFeedbackRequest export (or Netlify, Cloudflare, AWS, Vercel)

The useFeedback hook gives you rating, comment, submit, and all the state management. Code blocks can have their own per-snippet feedback too — check out showCodeBlockFeedback on the useCodeBlock hook.

Head to the feedback docs for the full setup.


Plugin-Math: Beautiful EquationsLink

I've wanted this for a while. @bdocs/plugin-math lets you write LaTeX in your MDX using familiar $...$ and $...$ delimiters:

When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are

$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $

Under the hood it uses a transformSource hook to convert those delimiters into <Math> and <BlockMath> components before the MDX parser even sees them. KaTeX handles the rendering on the client side — CSS loaded from CDN, zero configuration required.

Install it with pnpm add @bdocs/plugin-math, add mathPlugin() to your config plugins, and you're done. Read the plugin-math docs for details.


transformSource — A New Plugin HookLink

Speaking of transformSource — it's now a first-class lifecycle hook in the plugin API. It runs on raw MDX source before compilation, so you can transform text patterns, inject content, or preprocess syntax before the MDX parser touches it.

Multiple plugins can each register a transformSource hook and they chain — each output feeds into the next. The math plugin was the first real use case, but I see a lot of potential here for custom syntax extensions, templating, or preprocessing.

Check the plugin docs for the full hook signature.


Dev Flags: --port, --host, --forceLink

Three flags I finally added to boltdocs dev:

  • --port <number> — dev server port (defaults to 5173)
  • --host [address] — bind to a specific address, or bare --host to expose to your local network
  • --force — force Vite dependency re-optimization

Nothing fancy — just flags I kept typing manually and got tired of it. Full docs on the CLI page.


Bug Squashes & PolishLink

This release had a solid round of fixes for things that have been bothering me:

  • Theme flash on navigation — the dark/light mode switch no longer flickers when navigating between pages
  • collapsible: true / collapsed: false in meta_loaders — these sidebar config options were being ignored. Now they work as expected
  • Page-nav flat routes — the page navigation component now correctly flattens nested routes
  • i18n sync — fixed a race condition where switching locales could leave some UI elements untranslated
  • Code-block API improvements — the useCodeBlock hook got better typing, LangIcon resolution, and the custom pre component API is more predictable

Plugin-Image-OptimizerLink

A new internal package: @bdocs/plugin-image-optimizer. It's a fork of vite-plugin-image-optimizer — but I optimized it for Boltdocs.

What's different:

  • Persistent caching — images aren't re-optimized on every build. Cache is keyed by content hash and survives restarts
  • Parallel processing — worker threads use all available cores (minus one) with zero-copy buffer transfer
  • Scale integration — works with Boltdocs' AssetCache system and respects the .boltdocs/cache/ directory structure
  • Stats output — a DUI-powered table shows how much each format saved

It handles PNG, JPEG, WebP, AVIF, GIF, TIFF, and SVG (via Sharp + SVGO). The existing docs site plugins section will get a page for it soon — for now, check the package README.


Documentation RefreshLink

I spent time updating the official docs across the board — the plugin system page, the CLI reference, the component guides, and the integration docs all got cleaned up. The feedback and math pages are brand new, and the code-blocks guide is much more complete.


What's NextLink

I'm already working on the next round. Here's what's coming:

  • Giscus — comment/discussion integration for docs pages
  • Vercel Analytics & Speed Insights — one-click analytics with zero config
  • Google Search Console Verification — meta tag injection for site verification
  • Search API improvements — better ranking, fuzzy matching, and result previews
  • Spanish documentation — the official docs will get a full Spanish translation

Install or update:

pnpm add boltdocs@latest

Check the full docs to explore everything new.

Last updated on July 27, 2026
and `$...$` delimiters:\\n\\n```mdx\\nWhen $a \\\\ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are\\n\\n$ x = {-b \\\\pm \\\\sqrt{b^2-4ac} \\\\over 2a} $\\n```\\n\\nUnder the hood it uses a `transformSource` hook to convert those delimiters into `\u003cMath\u003e` and `\u003cBlockMath\u003e` components before the MDX parser even sees them. KaTeX handles the rendering on the client side — CSS loaded from CDN, zero configuration required.\\n\\nInstall it with `pnpm add @bdocs/plugin-math`, add `mathPlugin()` to your config plugins, and you're done. Read the [plugin-math docs](/docs/plugins/plugin-math) for details.\\n\\n---\\n\\n## `transformSource` — A New Plugin Hook\\n\\nSpeaking of `transformSource` — it's now a first-class lifecycle hook in the plugin API. It runs on raw MDX source **before** compilation, so you can transform text patterns, inject content, or preprocess syntax before the MDX parser touches it.\\n\\nMultiple plugins can each register a `transformSource` hook and they chain — each output feeds into the next. The math plugin was the first real use case, but I see a lot of potential here for custom syntax extensions, templating, or preprocessing.\\n\\nCheck the [plugin docs](/docs/plugins) for the full hook signature.\\n\\n---\\n\\n## Dev Flags: `--port`, `--host`, `--force`\\n\\nThree flags I finally added to `boltdocs dev`:\\n\\n- **`--port \u003cnumber\u003e`** — dev server port (defaults to 5173)\\n- **`--host [address]`** — bind to a specific address, or bare `--host` to expose to your local network\\n- **`--force`** — force Vite dependency re-optimization\\n\\nNothing fancy — just flags I kept typing manually and got tired of it. Full docs on the [CLI page](/docs/api/cli).\\n\\n---\\n\\n## Bug Squashes \u0026 Polish\\n\\nThis release had a solid round of fixes for things that have been bothering me:\\n\\n- **Theme flash on navigation** — the dark/light mode switch no longer flickers when navigating between pages\\n- **`collapsible: true` / `collapsed: false` in meta_loaders** — these sidebar config options were being ignored. Now they work as expected\\n- **Page-nav flat routes** — the page navigation component now correctly flattens nested routes\\n- **i18n sync** — fixed a race condition where switching locales could leave some UI elements untranslated\\n- **Code-block API improvements** — the `useCodeBlock` hook got better typing, `LangIcon` resolution, and the custom `pre` component API is more predictable\\n\\n---\\n\\n## Plugin-Image-Optimizer\\n\\nA new internal package: `@bdocs/plugin-image-optimizer`. It's a fork of [vite-plugin-image-optimizer](https://github.com/FatehAK/vite-plugin-image-optimizer/) — but I optimized it for Boltdocs.\\n\\nWhat's different:\\n- **Persistent caching** — images aren't re-optimized on every build. Cache is keyed by content hash and survives restarts\\n- **Parallel processing** — worker threads use all available cores (minus one) with zero-copy buffer transfer\\n- **Scale integration** — works with Boltdocs' `AssetCache` system and respects the `.boltdocs/cache/` directory structure\\n- **Stats output** — a DUI-powered table shows how much each format saved\\n\\nIt handles PNG, JPEG, WebP, AVIF, GIF, TIFF, and SVG (via Sharp + SVGO). The existing docs site plugins section will get a page for it soon — for now, check the package README.\\n\\n---\\n\\n## Documentation Refresh\\n\\nI spent time updating the official docs across the board — the plugin system page, the CLI reference, the component guides, and the integration docs all got cleaned up. The feedback and math pages are brand new, and the code-blocks guide is much more complete.\\n\\n---\\n\\n## What's Next\\n\\nI'm already working on the next round. Here's what's coming:\\n\\n- **Giscus** — comment/discussion integration for docs pages\\n- **Vercel Analytics \u0026 Speed Insights** — one-click analytics with zero config\\n- **Google Search Console Verification** — meta tag injection for site verification\\n- **Search API improvements** — better ranking, fuzzy matching, and result previews\\n- **Spanish documentation** — the official docs will get a full Spanish translation\\n\\nInstall or update:\\n\\n```bash\\npnpm add boltdocs@latest\\n```\\n\\nCheck the [full docs](/docs/) to explore everything new.\",\"collection\":\"blog\",\"tags\":[\"Release\"],\"author\":\"Jesús Alcalá\",\"excerpt\":\"2.9.0 ships the DUI toolkit as a standalone package, native feedback support, a proper math plugin with KaTeX, the transformSource lifecycle hook, CLI flags for dev, a long list of bug fixes, and a brand-new image optimizer.\",\"coverImage\":\"/blog-covers/Boltdocs-2.9.0.webp\",\"seo\":{\"author\":{\"name\":\"Jesús Alcalá\",\"avatar\":\"/avatar.jpeg\"}},\"date\":\"2026-06-06\",\"lastUpdated\":1785192302123.242,\"frontmatter\":{\"title\":\"Boltdocs 2.9.0 — DUI, Feedback, Math, and a Lot of Polish\",\"description\":\"DUI goes independent, feedback integration, official math plugin, transformSource hook, dev flags, bug squashing, and a new image optimizer\",\"date\":\"2026-06-06\",\"tags\":[\"Release\"],\"author\":{\"name\":\"Jesús Alcalá\",\"avatar\":\"/avatar.jpeg\"},\"excerpt\":\"2.9.0 ships the DUI toolkit as a standalone package, native feedback support, a proper math plugin with KaTeX, the transformSource lifecycle hook, CLI flags for dev, a long list of bug fixes, and a brand-new image optimizer.\",\"cover\":\"/blog-covers/Boltdocs-2.9.0.webp\",\"lastUpdated\":1785192302123.242},\"slugParts\":[]},\"headings\":[{\"level\":2,\"text\":\"This one's about sharing\",\"id\":\"this-ones-about-sharing\"},{\"level\":2,\"text\":\"DUI Goes Independent\",\"id\":\"dui-goes-independent\"},{\"level\":2,\"text\":\"Native Feedback Support\",\"id\":\"native-feedback-support\"},{\"level\":2,\"text\":\"Plugin-Math: Beautiful Equations\",\"id\":\"plugin-math-beautiful-equations\"},{\"level\":2,\"text\":\"transformSource — A New Plugin Hook\",\"id\":\"transformsource--a-new-plugin-hook\"},{\"level\":2,\"text\":\"Dev Flags: --port, --host, --force\",\"id\":\"dev-flags---port---host---force\"},{\"level\":2,\"text\":\"Bug Squashes \u0026 Polish\",\"id\":\"bug-squashes--polish\"},{\"level\":2,\"text\":\"Plugin-Image-Optimizer\",\"id\":\"plugin-image-optimizer\"},{\"level\":2,\"text\":\"Documentation Refresh\",\"id\":\"documentation-refresh\"},{\"level\":2,\"text\":\"What's Next\",\"id\":\"whats-next\"}],\"collection\":\"blog\",\"path\":\"boltdocs-2.9.0\",\"frontmatter\":{\"title\":\"Boltdocs 2.9.0 — DUI, Feedback, Math, and a Lot of Polish\",\"description\":\"DUI goes independent, feedback integration, official math plugin, transformSource hook, dev flags, bug squashing, and a new image optimizer\",\"date\":\"2026-06-06\",\"tags\":[\"Release\"],\"author\":{\"name\":\"Jesús Alcalá\",\"avatar\":\"/avatar.jpeg\"},\"excerpt\":\"2.9.0 ships the DUI toolkit as a standalone package, native feedback support, a proper math plugin with KaTeX, the transformSource lifecycle hook, CLI flags for dev, a long list of bug fixes, and a brand-new image optimizer.\",\"cover\":\"/blog-covers/Boltdocs-2.9.0.webp\",\"lastUpdated\":1785192302123.242},\"filePath\":\"[blog]/boltdocs-2.9.0.mdx\",\"date\":\"2026-06-06\",\"lastUpdated\":1785192302123.242}},\"actionData\":null,\"errors\":null}");