Bengal 0.2.4
Versioning for MkDocs migration, math rendering, Patitas consolidation, live reload
Key additions: MkDocs-compatible versioning (versions.json, root redirect), KaTeX math rendering, Patitas consolidation for frontmatter and notebooks, and improved live reload in the dev server.
Highlights
Versioning for MkDocs Migration
Versioned documentation sites now emit aversions.jsonfile compatible with MkDocs/Mike tooling, and support root redirects for docs-only deployments:
- versions.json: Lists versions with title, aliases, and URL prefixes (config:
versioning.emit_versions_json, default true) - Root redirect: Configurable redirect from site root to the default version (
versioning.default_redirect,versioning.default_redirect_target) - Docs: Versioning guide updated with format details and MkDocs migration comparison
Math and LaTeX Rendering
Add math support via thecontent.maththeme feature:
- Opt-in: Enable in
theme.featuresto load KaTeX CSS/JS - Elements: Renders
.math(inline) and.math-block(display) elements - Docs: New Math and LaTeX authoring guide; theme reference updated
Patitas Consolidation
Frontmatter and notebook parsing now use Patitas exclusively:
- Frontmatter: Replaces
python-frontmatter; requirespatitas>=0.3.3 - Notebooks: Replaces embedded
nbformat;.ipynbfiles parsed viapatitas.parse_notebook() - Result: Fewer dependencies, unified content pipeline
Dev Server and Live Reload
- Live reload: Replaced thread bridge with pure async SSE for more reliable hot reload
- DOM fragments: Instant partial updates when editing content (no full page refresh)
- Serve-first: Now requires build cache; clearer behavior when starting with empty output
Blog Theme
- Series navigation: New
series-navcomponent for the default blog theme - Layout:
blog-after-contentmoved insideblog-post-layoutfor cleaner structure
Other Changes
- Rendering: Improved error display when template engine raises errors
- Build: Parallel provenance filter for faster builds on large sites
- Build: Skip provenance verification on cold builds (no cached output)
- Shortcodes: Ref/RelRef, HasShortcode, nesting, strict mode, and CLI support
- Health: Refactored link validator with configurable resolution and skip rules
Breaking Changes
None. Fully backward-compatible release.
Upgrading
uv pip install --upgrade bengal
# or
pip install --upgrade bengal
# or use the self-update command
bengal upgrade