Support for anchor tags
jrson83 opened this issue · 2 comments
jrson83 commented
Hey,
I'm using the plugin to get the headings from .mdx
files to display them in a "Contents-List" as link with anchors and Intersection Observer in a sidebar. It would be totally great if you could add a third, maybe optional object anchor
and convert the values
you already have to lower-case and replace whitespace with dash
. So like:
[
{"depth": 1, "value": "Heading 1", "anchor": "#heading-1"},
{"depth": 2, "value": "Heading 2", "anchor": "#heading-2"},
{"depth": 3, "value": "Heading 3", "anchor": "#heading-3"},
]