about summary refs log tree commit diff stats
path: root/templates/section.html
diff options
context:
space:
mode:
authorAlan Pearce2024-05-29 16:01:03 +0200
committerAlan Pearce2024-05-29 16:01:03 +0200
commit99423f57f79499f13d021970c1efb4529072006b (patch)
treeaab3b0280ba6eabddb8ce8589538f9efb080a271 /templates/section.html
parentdea01a9d2d2853af740aff8d11f573a70e7c4962 (diff)
downloadzola-bearblog-99423f57f79499f13d021970c1efb4529072006b.tar.lz
zola-bearblog-99423f57f79499f13d021970c1efb4529072006b.tar.zst
zola-bearblog-99423f57f79499f13d021970c1efb4529072006b.zip
improve whitespace generation in output files
Diffstat (limited to 'templates/section.html')
-rw-r--r--templates/section.html20
1 files changed, 9 insertions, 11 deletions
diff --git a/templates/section.html b/templates/section.html
index 9560719..a389c93 100644
--- a/templates/section.html
+++ b/templates/section.html
@@ -1,6 +1,6 @@
 {% extends "base.html" %}
 
-{% block main %}
+{%- block main -%}
   <main>
     {%- if taxonomy.term %}
       <h3 class="filter">{{ trans(key="filtering_for",lang=lang)}} "{{ section.title }}"</h3>
@@ -9,7 +9,7 @@
       </small>
     {%- endif %}
     <ul class="blog-posts">
-      {% for page in section.pages %}
+      {%- for page in section.pages %}
         <li>
           <span>
             <i>
@@ -20,18 +20,16 @@
           </span>
           <a href="{{ page.permalink }}">{{ page.title }}</a>
         </li>
-        {% else %}
-        <li>
-          {{ trans(key="no_posts", lang=lang) }}
-        </li>
-      {% endfor %}
+        {%- else %}
+        <li>{{ trans(key="no_posts", lang=lang) }}</li>
+      {%- endfor -%}
     </ul>
     <small>
       <div>
-        {% set tags = get_taxonomy(kind="tags", lang=lang) %}
-        {% for post in tags.items %}
-          <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp;
-        {% endfor %}
+        {%- set tags = get_taxonomy(kind="tags", lang=lang) %}
+        {%- for post in tags.items %}
+        <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp;
+        {%- endfor %}
       </div>
     </small>
   </main>