vuepress
vuepress copied to clipboard
Skip template interpolation for configured markdown files
Feature request
Be able to skip the template interpolation for configured markdown files.
What problem does this feature solve?
I am currently migrating from mkdocs and i am trying to include existing markdown files from a npm repo into my custom documentation.
Having a markdown file like this
https://www.npmjs.com/package/@sap/approuter
there are parts like
{{ENV_VAR}} and {{{ENV_VAR}}}. If there is such an environment variable it will be replaced,
otherwise it will be just an empty string.
which leads to errors, because vuepress tries to apply vue templating!
I did not figure out any configuration option to selectively be able, to disable parsing for special files.
I even do not want to fix this inside the copied file, because i will update the docu periodically to get the latest version. Gregor and i did it the same way with mkdocs allowing to bundle multiple SAP docus at one place (see apis):
https://gregorwolf.github.io/SAP-NPM-API-collection/
Another common problem are broken image links. In such case, markdown files will not be rendered correctly. Maybe this can be controlled as a warning instead of hard error to allow quick documentations without further source processing.
What does the proposed API look like?
?
How should this be implemented in your opinion?
A glob like setting would make it easy to restrict folders and files from beeing auto processed inside config.js.
Are you willing to work on this yourself?
I am currently not an active vue developer (just using it for docu reason)!
Regards Holger
Unfortunately, there's no way to disable Vue syntax in VuePress.(If that's what you want)
However, IMHO, such variable or code related content should be written inside a code block:
`{{ENV_VAR}}` and `{{{ENV_VAR}}}`. If there is such an environment variable it will be replaced,
otherwise it will be just an empty string.
Hi Billy, i know this, but i want to auto include existing markdown from other projects without any manipulation.
I just want to disable vue template parsing like markdown that is used for github.
An option for this would be great!
Even enclosing in inline code blocks doesn't work. The following input
test `{{ blah }}`
renders
with the following error in console
Related issue: https://github.com/vuejs/vuepress/issues/2377