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 // mdit-vue plugins
md.use(anchorPlugin, { md.use(anchorPlugin, {
slugify, 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 ...options.anchor
} as anchorPlugin.AnchorOptions).use(frontmatterPlugin, { } as anchorPlugin.AnchorOptions).use(frontmatterPlugin, {
...options.frontmatter ...options.frontmatter

Loading…
Cancel
Save