Provide accessible markdown-it-anchor configuration

pull/2104/head
Alija Sabic 2 years ago committed by Evan You
parent 7182c4231f
commit 86259682c8

@ -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