-
I'm using custom markdown-it plugin to replace tag/shortcut in source md with a link in compiled html: https://github.com/Naninovel/naninovel.github.io/blob/main/docs/.vitepress/ext/markdown.ts#L10-L19 When doing this I need to know path of the processed file to figure which locale/language it is to link to appropriate docs. In vuepress I was able to access current route via https://github.com/Naninovel/Documentation/blob/master/docs/.vuepress/config.js#L92-L100 But in vitepress I can't find any way to do this, as Is this no longer possible or can be achieved in a different way? UPD: Instead md plugin I've tried using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok, so I was able to get the page path via |
Beta Was this translation helpful? Give feedback.
Ok, so I was able to get the page path via
env.relativePath
arg inrender
function of md plugin. For this I had to modify the regex plugin, though. https://github.com/Naninovel/naninovel.github.io/blob/main/docs/.vitepress/ext/md-regex.ts