Skip to content

docmd@0.10.1 – GitHub Heading IDs, Codeblock Parsing & Link Fixes

Latest

Choose a tag to compare

@mgks mgks released this 16 Nov 17:37

docmd logo

GitHub Heading IDs, Codeblock Parsing & Link Fixes

v0.10.1 adds support for GitHub-compatible flat heading IDs, alongside fixes for codeblock preservation in MDX compilation, internal link normalization for filenames containing dots and query parameters, and sidebar parsing improvements in the MkDocs migration tool.

Added

  • GitHub-Compatible Flat Heading IDs (@docmd/parser): Added option "markdown": { "headingIds": "github" } (or per-page frontmatter headingIds: github) to generate flat heading IDs following GitHub's slugging convention (lowercase, drop punctuation without collapsing dashes, spaces to hyphens, and -1, -2 suffixes for duplicate headings on a page). By default, docmd preserves its existing hierarchical contextual heading IDs ("nested"). Suggested by @thinkbig1979 in #286.

Fixed

  • Codeblock Expression Stripping (@docmd/plugin-mdx, lite-mdx): Upgraded lite-mdx to 0.1.2 with robust CommonMark-compliant code fence scanning. Code blocks containing quotes, titles, or language attributes (such as ```json "docmd.config.json") are now strictly protected from JSX/MDX expression compilation. Additionally, @docmd/plugin-mdx now only triggers MDX processing on .md files when JSX syntax or imports/exports are present.
  • Internal Links with Dots & Query Strings (@docmd/parser): Fixed issue where links to Markdown pages with dots in their filename (e.g. release-1.0.md, docmd.config.md) were misclassified as raw file assets, skipping trailing slashes and subpage ../ depth shifts. Query strings (e.g. other.md?tab=npm, index.md?tab=npm) are now separated alongside hash fragments before extension stripping and properly preserved across relative depth shifts. Resolves #284.
  • MkDocs Navigation Migration (@docmd/core): Fixed docmd migrate --mkdocs to terminate navigation parsing at the next top-level YAML key (preventing plugins: and markdown_extensions: from being added to the sidebar), unquote quoted titles/paths, and map index.md to root / or subfolder <dir>/ routes. Contributed by @jayhemnani9910 in #285.
  • Dynamic Version Test Assertion: Updated test assertion in tests/cli-contracts/variables-engine.test.js to assert dynamically against registry.get('docmd.version'), preventing breakage during patch bumps.

Documentation & Diagnostics

  • Heading IDs & Link Normalization Guides: Added configuration and frontmatter reference documentation for markdown.headingIds, and documented link preservation for filenames containing dots and query parameters across all four locales.
  • Iconify Plugin Documentation: Added dedicated documentation and live interactive container examples (Callouts, Buttons, Cards, Tabs, Tags) across all four locales (en, de, es, zh) in plugins/iconify.md.
  • Nested Code Block Formatting: Fixed nested code fence escaping in the Tabs component example, using 4-backtick blocks with wrapping ::: tabs container syntax.

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.10.0...0.10.1