Skip to content

Commit

Permalink
Provide accessible markdown-it-anchor configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sabicalija committed Mar 13, 2023
1 parent 43f6f02 commit f8d81e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/node/markdown/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8d81e3

Please sign in to comment.