From c9d311c787f950e22b4accd62e0e3cb9c6a13966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 19 May 2021 13:22:25 +0200 Subject: [PATCH 1/2] docs: use {% raw %} to wrap jinja2 tags in documentation As reported by @mrc0mmand: > Since https://github.com/systemd/systemd/commit/89f52a780e54b2eb0905a6e613f6d4afcb22256b#diff-b842e6ab4a95a695d9449d106f091e6a134d9eac8d2aee1cd8b169fcb6b3a98bR109 > the GH pages fail to build, since they use the Liquid templating language, > which coincidentally uses a very similar tags as jinja: > https://shopify.github.io/liquid/tags/control-flow/ > >> The tag elif on line 112 in HACKING.md is not a recognized Liquid tag. --- docs/HACKING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/HACKING.md b/docs/HACKING.md index 4374ba097d..80bb2a00ba 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -114,11 +114,12 @@ Some source files are generated during build. We use two templating engines: See https://mesonbuild.com/Reference-manual.html#configure_file for details. +{% raw %} * most files are rendered using jinja2, with `{{VARIABLE}}` and `{% if … %}`, `{% elif … %}`, `{% else … %}`, `{% endif … %}` blocks. `{# … #}` is a jinja2 comment, i.e. that block will not be visible in the rendered - output. `{% raw %} … {% endraw %}` creates a block where the jinja2 syntax - is not interpreted. + output. `{% raw %} … `{% endraw %}`{{ '{' }}{{ '% endraw %' }}}` creates a block + where jinja2 syntax is not interpreted. See https://jinja2docs.readthedocs.io/en/stable/templates.html#synopsis for details. From ba777d019f5cd8ca4f50077f55d2142ba4e6b874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 19 May 2021 13:53:41 +0200 Subject: [PATCH 2/2] docs: prettify two external links --- docs/HACKING.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/HACKING.md b/docs/HACKING.md index 80bb2a00ba..198ca52328 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -111,8 +111,9 @@ Happy hacking! Some source files are generated during build. We use two templating engines: * meson's `configure_file()` directive uses syntax with `@VARIABLE@`. - See https://mesonbuild.com/Reference-manual.html#configure_file for - details. + See the + [Meson docs for `configure_file()`](https://mesonbuild.com/Reference-manual.html#configure_file) + for details. {% raw %} * most files are rendered using jinja2, with `{{VARIABLE}}` and `{% if … %}`, @@ -121,7 +122,8 @@ Some source files are generated during build. We use two templating engines: output. `{% raw %} … `{% endraw %}`{{ '{' }}{{ '% endraw %' }}}` creates a block where jinja2 syntax is not interpreted. - See https://jinja2docs.readthedocs.io/en/stable/templates.html#synopsis + See the + [Jinja Template Designer Documentation](https://jinja2docs.readthedocs.io/en/stable/templates.html#synopsis) for details. Please note that files for both template engines use the `.in` extension.