vitepress
vitepress copied to clipboard
Import code snippets as dynamic path
Is your feature request related to a problem? Please describe.
Is there any way to import code snippets as dynamic name. For example get from $frontmatter
.
<<< ./{{ $frontmatter.file }}
Describe the solution you'd like
I think the fence should replace the variable first.
Describe alternatives you've considered
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Read the Contributing Guidelines.
- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
I found a solution to do by config md.renderer.rules.fence
but I think it still should have a globally solution.
Hi @juzser, are you still sticking with the solution? Would you share your configuration?
I'm still modifying markdown fence to achieve the result. You can check my configuration at this file link