-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix formatting for Markdown files containing {{
#48
Conversation
They're usually examples of Go-style text templates. But, Liquid templating is treating them as variable substitutions. E.g., in `engine/reference/commandline/ps.md`: ```bash $ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}" ``` is rendered as: ```bash $ docker ps --filter volume=remote-volume --format "table \t" ``` Solution is to wrap entire files in `{% raw %} ... {% endraw %}` blocks.
I think this fixes #44. Not sure whether the (much-)simpler option of changing |
I'd prefer that we put {% raw %} and {% endraw %} around every instance of a {{ bracketed }} string, like so:
Or at least, just the affected code blocks. The scope should be narrower, is what I mean. If you wrap raw/endraw around the entire page like this, that will prevent any Liquid templating language from processing. So if anyone touches these 35 pages in the future and tries to include a file, add some logic, print a variable, etc., they're going to see the raw code instead of the interpreted/processed code. |
This if very nice solution, because docs contributors should not need to thing about Jekyll. How about to improve it by adding condition to _layouts/docs.html to turn on Luquid optionally? Like this:
And in all content files where Liquid is needed just include this on top:
|
Reverts commit b3a6208 in order to replace it with more-targeted blocks.
They're usually examples of Go-style text templates. But, Liquid templating is treating them as variable substitutions. E.g., in
engine/reference/commandline/ps.md
:$ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}"
is rendered as:
$ docker ps --filter volume=remote-volume --format "table \t"
Solution is to wrap entire files in
{% raw %} ... {% endraw %}
blocks.