Last active
April 9, 2021 08:18
-
-
Save davay42/fc90eafe236f873b4110f7f913e10934 to your computer and use it in GitHub Desktop.
Vitepress pages tags collections
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This small script recursively takes all the .md files in the given directory, parses their frontmatter and creates collections of the pages based on 'tags' lists. It may be used to create any kind of navigation for vitepress. It works fine when just imported into the vitepress config and added to 'customData' property there
customData: { skills: getTags('../../skills') }
. I need help making it a proper npm package – I'm not a node xpert and can't figure out the exact build setup configuration for that.