Description
This is more question than feature request, but I didn't found how to workaround...
Basically I just need to render on hide some part of markdown document depends on how I would like to build it, for development we are adding additional info, while from production, that info must be removed... Can you please suggest me how easily to solve that problem with ViuePress?
Feature request
What problem does this feature solve?
Similar to for example Asciidoctor where we can use ifdef
/ enddef
conditional directives...
Possibility to add markup (or hide it) directly in markdown files depends on some defined globaly conditions.
Like v-if
and v-else
directive but defined directy in markdown file
What does the proposed API look like?
# title
<MyConditionalComponent :condition="process.env.NODE_ENV === 'development'">
## development info
</MyConditionalComponent>
<MyConditionalComponent :condition="process.env.NODE_ENV === 'production'">
## production info
</MyConditionalComponent>
<!-- ...skipped -->
I kn ow, process.env
is not available on vuepress markdown page, maybe we could somehow get conditional expression from .vuepress/enhanceApp.js
?
How should this be implemented in your opinion?
I dont. know, maybe some html wrapping elemet with some class or data-property...
Are you willing to work on this yourself?
Yes, I do