Repository navigation
OpenAPI, LLMs & Internationalisation
v0.9.9 introduces a unified Variables Engine and interactive Playground, alongside fixes for search routing, template resolution, monorepo dependency handling, and AI assistant context synthesis.
Added
- Unified Variables & Personalisation Engine (
@docmd/core,@docmd/parser,@docmd/ui): Introduces{{ variable }}interpolation during static builds, with fallback values using||and syntax escaping via\{{ ... }}. Supports built-in variables includingdocmd.version,docmd.buildYear,docmd.buildDate,docmd.buildTime,docmd.gitCommit,docmd.gitBranch,site.title,site.base,page.title,page.slug, andpage.path. Variables can also be used in configuration, banners, and footer copyright strings. Environment variables are accessible throughenv.*, withDOCMD_VAR_values promoted to top-level variables. - Headless Client Runtime (
@docmd/ui): Bundlesdocmd-runtime.jsacross thedefaultandsummertemplates. Exposeswindow.docmd.varwithget(),set(),list(), andsync()for dynamic personalisation, reactive DOM updates, personalised code snippets, and cross-frame synchronisation. - Interactive Playground Plugin (
@docmd/plugin-playground): Adds a zero-configuration code runner, enabled by default. Supports executable fenced code blocks and::: playgroundcontainers, source script integration viasrc, Live and Code view tabs, HTML/CSS previews, console interception, and execution result display. Integrates with the client runtime and Variables Engine, includingdocmd.var.get(),docmd.var.set(), anddocmd.theme.toggle().
Improved
- AI Assistant Context Synthesis (
@docmd/plugin-ai): Introduces Snippet-First Synthesis for documentation tool calling, delivering relevant passages and code examples with fewer roundtrips. - Playground Authoring & Runtime Experience: Adds graceful warnings for missing scripts, structured execution error alerts, editor reset behaviour, and read-only mode handling. Playground assets are injected conditionally, so pages without playground blocks load no additional CSS or JavaScript.
Fixed
- Versioned Search Path Resolution (
@docmd/plugin-search): Search index loading now works correctly under versioned base paths such as/vX.Y.Z/. The client prioritises the authoritative build-timewindow.DOCMD_SITE_ROOT, retaining relative path deduction as a fallback. Contributed by @Goldloli in #266, closing #262. - SPA Logo Navigation (
@docmd/ui): External logo destinations and root-relative workspace links now bypass unwanted client-side routing interception, fixing navigation errors while preserving internal SPA transitions. - Template Layout Slot Resolution (
@docmd/api,@docmd/ui): Eliminates false-positive layout slot warnings, including those affecting thesummertheme. - Monorepo Runtime Dependency Isolation: Restricts source package detection to valid monorepo contexts and adds hierarchical module resolution fallbacks to prevent peer dependency pruning during npm v7+ workspace development.
Security & Maintenance
- Playground HTML previews run inside sandboxed iframes without
allow-same-origin, restricting access to parent DOM, cookies, and storage. Runtime variable injection uses.textContentto avoid DOM XSS. - Updated the npm dependency group across workspace packages in PR #265.
- Updated
docker/login-actionin PR #264.
Links
Documentation: https://docs.docmd.io/
Cloud Platform: https://cloud.docmd.io/
Dev & Writing Skills: https://github.com/docmd-io/docmd-skills
New Contributors
Full Changelog: 0.9.8...0.9.9
