docmd@0.4.8 🚀 (Stability, UX & SPA Update)
v0.4.8 is our biggest stability and UX update yet. We’ve completely overhauled the internal architecture to make docmd faster, smarter, and incredibly beautiful out-of-the-box. Frosted-glass headers, deep container nesting, and buttery-smooth page transitions, all while keeping the core footprint tiny.
✨ Highlights
1. The New V2 Layout Configuration
We've introduced a cleaner, more organized configuration structure. All UI elements (header, sidebar, options menu, footer) are now neatly grouped under a layout object.
NOTE: Your existing v0.4.7 config is 100% backward compatible! Our new internal schema adapter translates it on the fly.
Example of the new structure:
module.exports = {
siteTitle: 'My Docs',
layout: {
spa: true, // Seamless page transitions
header: { enabled: true },
sidebar: { collapsible: true, defaultCollapsed: false },
// Centralized options menu!
optionsMenu: {
position: 'header', // 'header', 'sidebar-top', 'sidebar-bottom'
components: {
search: true,
themeSwitch: true,
sponsor: 'https://github.com/sponsors/your-name'
}
},
// The New "Complete" Footer
footer: {
style: 'complete', // 'minimal' or 'complete'
description: 'The minimalist documentation generator.',
copyright: '© 2026 My Project',
columns: [
{
title: 'Resources',
links:[
{ text: 'Getting Started', url: '/getting-started' },
{ text: 'API', url: '/api' }
]
}
]
}
}
}I will update the complete new config template in the documentation
2. Introducing SPA Router & Event Delegation
We completely rewrote the client-side JavaScript. Instead of attaching hundreds of event listeners, docmd now uses a single, highly-optimized Event Delegation model.
- Seamless Navigation: Clicking sidebar links instantly swaps content without reloading the page, without breaking
<head>relative paths, and without throwing Favicon 404s. - Failsafe Offline Mode: If you open the docs locally via
file:///, the SPA intelligently disables itself to prevent browser CORS blocks.
3. The Migration Tool (docmd migrate)
Moved to the new V2 config structure? We built a tool to do it for you.
Run docmd migrate in your project root. It will:
- Backup your existing
docmd.config.js. - Intelligently map your old settings (
search,theme,sponsor) to the new nestedlayoutstructure. - Generate a clean, modern config file automatically.
4. Deep Container Nesting
Previously, nesting a ::: button inside a ::: card inside ::: tabs could confuse the Markdown parser into closing the wrong container. We wrote a custom depth-tracking parser. You can now infinitely nest components without breaking the layout.
5. Premium UI Overhaul
- Cross-Browser Perfection: Buttons, SVGs, and header elements are now strictly bound to
remand CSS variables. They look pixel-perfectly identical on Safari, Chrome, and Firefox. - Heading Anchors: Hovering over any
h2,h3, orh4now reveals a beautiful, clickable permalink chain icon. - Frosted Glass: The sticky top header now features a modern
backdrop-filter: blureffect. - Smart Scrollbars: Scrollbars are now theme-aware. In Chrome, they auto-hide until hovered. In Safari, they respect native OS dark/light color schemes natively.
- Themes Update: The
defaulttheme is now stable and nearing its final design stage. Other themes have received initial improvements but are not yet fully stable. They will continue to be refined over the next few releases.
📝 Complete Changelog
Features & Enhancements:
- Core: Added
docmd migratecommand. - Failsafe:
failsafe.jsnow includes a Virtual Machine (VM) runtime test to catch crashes before they happen. - Config: Introduced nested
layoutschema with backward compatibility adapter. - Config: Added
layout.spa: true/falseto easily toggle the SPA router. - UI: Added multi-column
completefooter option. - UI: Added
docmd-headinganchor links for H2, H3, and H4. - UI: Unified
optionsMenufor Search, Theme, and Sponsor buttons allowing easy repositioning. - UX: Replaced jittery
scrollIntoViewin the Table of Contents with a smooth, targeted containerscrollTo. - UX: Dummy navigation links (paths like
#or missing) now render as unclickable<span class="nav-category-label">to prevent false active states.
Bug Fixes:
- Core: Fixed relative path duplication bug (
content/content/syntax) during SPA navigation. - Core: Dev server now correctly throws a
301redirect to append trailing slashes on directories, mimicking production servers. - Core:
docmd initnow generates the modern V2 configuration by default. - Parser: Fixed greedy closing tags (
:::) when nesting Cards, Callouts, and Collapsibles. - Plugins:
plugin-searchcompletely decoupled from the layout template. The search modal is now self-injected by the plugin, reducing bundle size for users who disable it. - Plugins:
plugin-mermaidnow does lazy rendering to prevent layout crashes when diagrams are placed inside hidden containers. - Plugins:
plugin-mermaidnow seamlessly handles dark mode toggles without forcing a full page reload. - Plugins: Fixed Monorepo plugin resolution fallback (
Cannot find module @docmd/plugin-search). - Security: Updated
minimatchvia overrides to patch a transitive vulnerability. Updatedesbuildandlucide-staticto latest.
📥 Upgrade
npm install -g @docmd/coreFull Changelog: 0.4.7...0.4.8
