Closed d-koppenhagen closed 2 weeks ago
Ah just defineProps in your template markdown and import it instead of using file inclusion.
Can you give me an example?
Awesome! This solution is way better than my suggestion. Thanks for your help.
@brc-dd This is fantastic.
I happened to be writing a VitePress 101 tutorial from morning till night today. I incorporated your technique into the advanced techniques collection just now.
Currently, this tutorial is only available in Chinese. I will consider translating the entire series into English after refining it.
You might be able to view it through browser translation.
The 10-part tutorial: https://www.alang.ai/vitepress/
@brc-dd thanks for your kind help in vitepress issue discussion.
@fjun99 It'll be better if you set lang: 'zh-Hans'
in your .vitepress/config.ts
. Browsers will then show translation prompt automatically.
@fjun99 It'll be better if you set
lang: 'zh-Hans'
in your.vitepress/config.ts
. Browsers will then show translation prompt automatically.
ok, thanks!
Is your feature request related to a problem? Please describe.
I have a documentation page, where I want to include a markdown template in multiple pages. This template is basically always the same but some words should be replaced.
Describe the solution you'd like
Let's assume we have a markdown file which includes the template and sets the variable values:
The template
my-template.md
could look like: