v0.9.6 - Focus Mode, Multi-Position Banners, Title & SEO Architecture, OKF Enhancements & Security Upgrades
Highlights
docmd v0.9.6 brings a major suite of capabilities and refinements across the documentation engine:
- Focus Mode (Zen Mode): Distraction-free reading with dedicated top-right Print and Light/Dark Mode controls.
- Multi-Position Banners: 7 distinct banner positions (
top,header,sidebar-top,sidebar-bottom,toc-top,toc-bottom,footer) with project-to-version inheritance, persistent card defaults, and session persistence. - Heading Anchor Permalinks: Instant click-to-copy full anchor URLs with visual animated checkmark confirmation.
- Image Lightbox Re-bind & UI Polish: Event delegation and SPA page re-binding, frosted glass captions, and integrated close controls.
- Title & SEO Architecture: Granular
layout.titleSeparator,layout.titleAppendcontrol, and automatic structured JSON-LD schemas (Organization,WebSite,BreadcrumbList, and custom frontmatterldJson). - Open Knowledge Format (OKF): Concept descriptions in
okf.yamland automatic tag merging from bothtagsandkeywords. - Post-Build Asset Declarations Hook: Exposing an immutable, deeply frozen snapshot of resolved plugin/template assets to post-build hooks.
- AI Assistant Multi-Turn Streaming: Live token replacement protocol (
meta.replace: true) and synthesis fallback across multi-turn reasoning. - Security Dependency Hardening: Remediation of upstream vulnerabilities across
sharp,adm-zip, andprotobufjs, plus automated pipeline security auditing. - Batch Pre-Flight Runtime Dependency Auto-Install: Unified zero-config batch installation of templates, plugins, and semantic search peer dependencies without manual
package.jsondeclarations or npm tree pruning. - Parser & Live Editor Enhancements:
openflag support for::: detailsalias matching::: collapsible, expanded container attributes, and smooth return navigation in the in-browser Live Editor.
Focus Mode & Print Controls (@docmd/ui & @docmd/template-summer)
- Distraction-Free Zen Reading: With a single click on the options menu or keyboard shortcut (
Alt+F/Option+F), all navigation sidebars, headers, table of contents, breadcrumbs, footers, and floating tools recede into the background. Content centres with optimal typographic line length for immersive technical reading. - Dedicated Top-Right Controls: In Focus Mode, only the three essential reading tools remain in the floating top-right toolbar:
- Print Page (
printericon, triggeringwindow.print()with a tailored, clean print stylesheet). - Light / Dark Mode Toggle (allowing instant theme switching while in focus).
- Exit Focus Mode (
minimize-2icon or pressingEsc/Alt+F).
- Print Page (
- Document Copy Widgets Print Button: When print is enabled (
layout.print: trueorlayout.optionsMenu.components.print: trueorlayout.copyWidgets.print: true), a dedicated Print button renders directly alongside the Copy Markdown and Copy Context buttons in the document header. - Comprehensive Print Stylesheet: Built-in
@media printrules ensure printed documentation or PDF exports strip away all navigation and web chrome, producing crisp, publish-ready paper documents. - Cross-Template Support: Fully supported out of the box in both the default
@docmd/uitemplate and the@docmd/template-summerlayout. - Configurable Options Menu:
optionsMenu.components.focusModeandoptionsMenu.components.printcan be configured directly indocmd.config.jsonunderlayout.optionsMenu.components.
Multi-Position Banners & Inheritance (layout.banners)
- 7 Dedicated Display Positions: Configure site announcements and contextual callouts across
top,header,sidebar-top,sidebar-bottom,toc-top,toc-bottom, andfooter. - Card Banner Persistence Defaults: Sidebar and Table of Contents card banners (
sidebar-top,sidebar-bottom,toc-top,toc-bottom) now default to persistent (dismissible: false), ensuring promotional and sponsor cards stay visible across pages. Banners can explicitly opt in to dismissal usingdismissible: trueordismissable: true. - Dismissible Spelling Aliases: Support for
dismissableandclosableconfiguration keys alongside standarddismissible. - Hierarchical Inheritance & Overrides: Versioned documentation sites can inherit workspace or project banners while allowing specific documentation versions (e.g.
v09) to override or introduce distinct notices without losing sidebar notices. - Rich Content & Persistence: Each banner supports markdown text, customizable Lucide icons, action hyperlinks, visual variants (
info,tip,warning,announcement), and sessionStorage-persisted dismissal state.
UI & Navigation Enhancements
- Click-to-Copy Section Anchor URLs: Clicking any section header anchor permalink icon (
#) now copies the full page URL with hash directly to the user’s clipboard. The anchor icon temporarily transitions to a green checkmark confirmation icon with automatic fallback handling. - Image Lightbox Re-binding & Modernized UI: The built-in lightbox now uses unified event delegation and automatically re-binds across client-side SPA route transitions (
docmd:page-mounted). The modal UI has been updated with a sleek frosted glass (backdrop-filter) caption bar and a circular close button. - Reading Time Calculation: Improved accuracy for reading time estimates across complex Markdown documents, accounting for code blocks and media elements.
- Hardened Client-Side Router: Client-side hover prefetching and SPA navigation now strip accidental wrapping quotes from
hrefattributes, properly detecttarget="_blank"andrel="noopener", and preserve root path navigation. - Unescaped Navigation Attributes: Fixed EJS attribute escaping in sidebar navigation templates (
<%-instead of<%=), ensuring custom data attributes, aria labels, and link properties render cleanly. - Plugin Live Reload Sync: Resolved an issue in
packages/api/src/hooks.tswhere reloading a plugin configuration in live development mode did not assign the reloaded module torawModule, ensuring runtime module reloads take effect immediately.
Title, Navigation & SEO Architecture (@docmd/plugin-seo & @docmd/core)
- Configurable Title Separators: Authors can now customize the separator string between page title and site title via
layout.titleSeparator(e.g." - "," | "," / "), with per-page frontmatter override support. - Title Append Control:
titleAppend: falsein page frontmatter orlayout.titleAppend: falsesuppresses appending the site title, allowing precise, standalone<title>strings on marketing and landing pages. - Structured JSON-LD Schemas:
- Automatically emits Google-compliant
Organizationschema on root homepages. - Generates
WebSiteschema with linked search query specifications. - Emits hierarchical
BreadcrumbListschemas across nested documentation structures. - Supports custom raw JSON-LD injection via the frontmatter
ldJsonproperty.
- Automatically emits Google-compliant
- Social Graph Consistency: Enforces identical titles across HTML
<title>, Open Graphog:title, and Twittertwitter:titletags.
Open Knowledge Format Enhancements (@docmd/plugin-okf)
- Concept Descriptions:
okf.yamlconcepts now automatically populatedescriptionfields from page frontmatter or document introductory abstracts. - Flexible Tag Merging: The OKF bundle generator now seamlessly unifies
tagsandkeywordsfrontmatter properties, whether specified as arrays or comma-separated strings.
Post-Build Asset Declarations Hook (@docmd/api & @docmd/core)
- Immutable Asset Snapshots: The post-build plugin hook pipeline now receives an immutable declaration snapshot of all resolved plugin and template assets (
report.resolvedAssets), allowing post-processors and deployers to inspect output assets safely without risking manifest mutations.
AI Assistant Multi-Turn Streaming & Stream Replacement (@docmd/plugin-ai & docmd-assistant)
- Extended Multi-Turn Reasoning: Expanded the internal conversational budget up to 6 turns, ensuring tool-assisted searches (such as documentation structural checks and page readings) complete before final synthesis.
- Real-Time Stream Replacement: Implemented a streaming replacement protocol (
meta.replace: true) allowing live SSE tokens to stream immediately during thought iterations without leaking raw tool markers. - Architectural Synthesis Fallback: Added a multi-tier fallback context synthesizer when queries reference concepts not directly mapped in primary navigation.
- Configurable Message Actions: Message action controls (Copy Response, Retry, and Edit Prompt) in
@docmd/plugin-aican be enabled viaconfig.plugins.ai.messageActions: true(defaulting tofalse).
File Exclusions & Git Ignore Filtering
- Project-Level Exclusions: Added
config.excludeglob support to allow documentation authors to exclude draft pages, internal notes, and temporary assets from generation. - Automatic
.gitignoreHonouring: Integrated a tree-walking.gitignoreparser that automatically excludes ignored markdown files and directories from HTML compilation and semantic search vectorisation.
Markdown Parser & Container Enhancements (@docmd/parser)
- Details Container Open Flag: Added support for the
openflag on::: detailsaliases matching the behavior of::: collapsible open. - Container Property Mapping: Added support for
title,text, andlabelproperties across badges, tags, buttons, tooltips, and changelog containers. - Icon Set Update: Upgraded bundled
lucide-staticto^1.47.0.
Live Editor Playground (@docmd/live)
- Cross-Site Seamless Flow: Added direct return navigation to
https://docmd.iovia the back button and logo. - KaTeX Preset Preservation: Prevented
String.prototype.replacefrom escaping double-dollar signs ($$) in KaTeX math presets.
Security Auditing & Dependency CVE Remediation
- Critical CVE Patches:
sharp(^0.35.4): Remediates critical security advisories relating to bundledlibheifvulnerabilities (GHSA-rgj7-g3m4-5g8c).adm-zip(>=0.6.0): Resolves directory traversal and arbitrary file write vulnerabilities (GHSA-955c-w567-g4pw).protobufjs(^7.6.5): Fixes prototype pollution vulnerabilities (CVE-2023-36665).onnxruntime-node(^1.27.0): Upgraded to provide modern native prebuilds for Node 20/22+ on Apple Silicon (darwin-arm64) and modern Linux distributions.
- Automated Pipeline Security Audit:
tools/prep.jsnow executes an automated security audit (pnpm audit --audit-level=high) prior to building, preventing any code from being packaged or released with high or critical vulnerabilities. docmd-searchDependency Locks: Explicit package overrides and peer dependency definitions ensure consumers never install outdated or vulnerable binary dependencies.
Summer Template & Mobile Refinements (@docmd/template-summer & @docmd/plugin-ai)
- Summer Palette Variable Bridge: Core and plugin CSS variables (
--docmd-*,--bg-color,--sidebar-bg,--text-color, etc.) are now mapped directly onto the Summer theme tokens, ensuring plugin UI (AI Assistant, Git metadata, OpenAPI) and shared components render with accurate colors and styling under the Summer template. - Mobile Topbar Search: Added an adaptive search toggle button for viewports under 900px, enabling mobile readers to access the full-width search input smoothly. Integrated with
Cmd/Ctrl+Kand/hotkeys, withEscapeto close. - Responsive Git Popover: Restructured the commit popover under 900px to anchor cleanly to the footer and adapt to the viewport width, eliminating horizontal page overflow on small screens.
- AI Bar Mobile Flex: Added
min-width: 0to the AI Assistant prompt bar input, allowing it to flex responsively without overflowing narrow mobile viewports.
Batch Pre-Flight Runtime Dependency Installation (@docmd/api & @docmd/core)
- Zero-Manual Installation for Templates, Plugins & Semantic Search: Documentation projects can now specify official templates (e.g.
theme.template: 'summer'), plugins (e.g.plugins: ['math', 'mermaid']), search engines (plugins.search.semantic: true), or rendering engines (engine: 'rust') directly in configuration without manually declaring or installing them inpackage.json. - Pre-Flight Discovery & Single Batch Installation: Before starting compilation across both multi-project workspaces (
buildWorkspace) and single-project sites (buildSite), docmd conducts a pre-flight scan of all configured requirements. If any runtime dependencies or peer packages (docmd-search,@huggingface/transformers,onnxruntime-node,sharp) are missing fromnode_modules, docmd dynamically resolves their versions and installs them all together in a single atomic batch command with--no-save. - Elimination of npm Tree Reconciliation Pruning: Previously, installing missing packages sequentially during different build phases caused modern npm (v7+) to treat earlier auto-installed packages as extraneous and prune them from
node_modules(e.g. deleting@docmd/template-summerwhendocmd-searchinstalled later). Installing all dependencies in one unified batch guarantees all runtime assets and layouts remain intact on disk. - Dynamic Registry-Aware Versioning: Runtime installations dynamically query the npm registry to fetch the latest published versions, preventing
ETARGETfailures during pre-release development while ensuring published production releases automatically install matching versions. - Strict Scope & Registry Validation: Unknown or unofficial package names that do not match
@docmd/*or are absent from the official docmd catalog are strictly rejected with clean warning reporting, ensuring the auto-installer remains completely secure.
Community Contributors & Acknowledgements
We are grateful to the community members whose pull requests and bug fixes helped shape this release:
@MSOB7YY: Summer template mobile search toggle, responsive git popover, CSS token bridging, and AI input overflow fix (#238), plus broken link and route normalization fixes (#229).@w666: Image lightbox re-binding on SPA navigation and modern UI styling (#234), and heading anchor permalink click-to-copy (#236).@justinTM: Accurate reading time computation fix (#231).