diff options
author | Alan Pearce | 2024-05-29 16:01:03 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-29 16:01:03 +0200 |
commit | 99423f57f79499f13d021970c1efb4529072006b (patch) | |
tree | aab3b0280ba6eabddb8ce8589538f9efb080a271 /templates/macros.html | |
parent | dea01a9d2d2853af740aff8d11f573a70e7c4962 (diff) | |
download | zola-bearblog-99423f57f79499f13d021970c1efb4529072006b.tar.lz zola-bearblog-99423f57f79499f13d021970c1efb4529072006b.tar.zst zola-bearblog-99423f57f79499f13d021970c1efb4529072006b.zip |
improve whitespace generation in output files
Diffstat (limited to 'templates/macros.html')
-rw-r--r-- | templates/macros.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/macros.html b/templates/macros.html index 2ad23e6..571c6e0 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -1,12 +1,12 @@ -{% macro table_of_contents(toc, max_level) %} +{%- macro table_of_contents(toc, max_level) %} <ul> - {% for header in toc %} + {%- for header in toc %} <li> <a href="{{ header.permalink | safe }}">{{ header.title }}</a> - {% if header.children and header.level < max_level %} - {{ self::table_of_contents(toc=header.children, max_level=max_level) }} - {% endif %} + {%- if header.children and header.level < max_level %} + {{- self::table_of_contents(toc=header.children, max_level=max_level) | indent() | safe() }} + {%- endif %} </li> - {% endfor %} + {%- endfor %} </ul> -{% endmacro %} +{%- endmacro %} |