github withastro/astro @astrojs/markdoc@0.13.0

latest releases: astro@5.5.2, astro@5.5.1, astro@5.5.0...
one day ago

Minor Changes

  • #13352 cb886dc Thanks @delucis! - Adds support for a new experimental.headingIdCompat flag

    By default, Astro removes a trailing - from the end of IDs it generates for headings ending with
    special characters. This differs from the behavior of common Markdown processors.

    You can now disable this behavior with a new configuration flag:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      experimental: {
        headingIdCompat: true,
      },
    });

    This can be useful when heading IDs and anchor links need to behave consistently across your site
    and other platforms such as GitHub and npm.

    If you are using the rehypeHeadingIds plugin directly, you can also pass this new option:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    import { rehypeHeadingIds } from '@astrojs/markdown-remark';
    import { otherPluginThatReliesOnHeadingIDs } from 'some/plugin/source';
    
    export default defineConfig({
      markdown: {
        rehypePlugins: [
          [rehypeHeadingIds, { experimentalHeadingIdCompat: true }],
          otherPluginThatReliesOnHeadingIDs,
        ],
      },
    });

Patch Changes

  • Updated dependencies [cb886dc, a3327ff]:
    • @astrojs/markdown-remark@6.3.0

Don't miss a new astro release

NewReleases is sending notifications on new releases.