Provide accessible markdown-it-anchor configuration

pull/2040/head
Alija Sabic 2 years ago
parent 43f6f02eb8
commit f8d81e377c

@ -99,7 +99,11 @@ export const createMarkdownRenderer = async (
// mdit-vue plugins
md.use(anchorPlugin, {
slugify,
permalink: anchorPlugin.permalink.ariaHidden({}),
permalink: anchorPlugin.permalink.linkAfterHeader({
style: 'aria-label',
assistiveText: (title) => `Permalink to "${title}"`,
wrapper: ['<div class="header-wrapper">', '</div>']
}),
...options.anchor
} as anchorPlugin.AnchorOptions).use(frontmatterPlugin, {
...options.frontmatter

Loading…
Cancel
Save