In Vue Test Utils, we have headers generated from method names. Some of these include arguments, which leads to ugly headers and URLS:
## is(selector)
sidebar: is(selector)
path: /api/wrapper/#is-selector
Add a way to control the generated header link:
## is(selector) <!-- HeaderLink: is -->
As a markdown comment.
Not at the moment, no
A quick question, only for the customization of links generation, not including headers, right?
Yes , but it would also be good to customize the Header link text:
## is(selector) <!-- HeaderLink: is, HeadLinkText: is -->
OK, but recently I'm working for next major version (leverage monorepo, refine default theme / plugin / theme API), I will work for that after we finalized next version.
Something like this would be really useful for us for a slightly different use-case.
If we could mark headers with a unique code or reference then we could refer to that block of content even if it is moved between pages.
Currently as we are developing our docs the structure is changing frequently and so we can't trust that links won't be broken. It would be great to be able to refer to a section in a canonical way that allows us to link to it more safely externally.
For example, an href referring to some part of our help documentation might currently be: example.com/getting-started.html#creating-your-first-user. If the page name is changed to 'first-steps.md' then the link will break, or if the whole heading + content is moved to a new page it will also be broken. If we could instead go:
```getting-started.md
```
Or similar. Then we could potentially have inbound links like: example.com/?ref=create-user. Although my suggested solution and use-case is slightly different, having a precedent set for adding metadata to a heading would be really useful. (I also saw a pull request which mentioned adding badges to headers which this could also theoretically be used for).
Solved! Plugin markdown-it-custom-header-link was created
Solved! Plugin markdown-it-custom-header-link was created
Thanks! I'll check, @abernov!
Closing this as it's resolved by markdown-it-custom-header-link.
Most helpful comment
Solved! Plugin markdown-it-custom-header-link was created