Currently to create an internal link you have to manually write a RouterLink.
This is my markdown
This is an internal <RouterLink to="/example">link</RouterLink>
I would like to write internal links like regular markdown links and have it automatically convert to a RouterLink
This is my markdown
This is an internal [link](/example)
Suggested solution
All links that are only a path: E.G. / or /example/path and don't start with a website url like https://example.com/example/path should be treated like internal links.
In unplugin-vue-markdown options add a internalLinkComponent option, similar to the wrapperComponent option:
Markdown({
internalLinkComponent: 'RouterLink'
})
This would also allow users to pass a custom router link component
Clear and concise description of the problem
Currently to create an internal link you have to manually write a
RouterLink
.I would like to write internal links like regular markdown links and have it automatically convert to a
RouterLink
Suggested solution
All links that are only a path: E.G.
/
or/example/path
and don't start with a website url likehttps://example.com/example/path
should be treated like internal links.In unplugin-vue-markdown options add a
internalLinkComponent
option, similar to thewrapperComponent
option:This would also allow users to pass a custom router link component
Alternative
No response
Additional context
No response
Validations