d3c3nt

[DORMANT] a fairly decent theme for the zola static site engine
git clone git://git.figbert.com/d3c3nt.git
Log | Files | Refs | README | LICENSE

commit dbe160ed8fd5cc53fee91dbbee2a6b30a5588e24
parent 630e912922aa747b72163a52df8a14e7d7da7630
Author: FIGBERT <figbert@figbert.com>
Date:   Thu, 23 Dec 2021 16:20:42 -0800

Delete whitespace control sequence from templates

Given that we're minifying the html anyway, it doesn't make sense to
work really hard to make the templates generate pretty, handwritten-like
output.

Diffstat:
Mtemplates/anchor-link.html | 14+++++++-------
Mtemplates/index.html | 11++++++-----
Mtemplates/list.html | 4++--
3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/templates/anchor-link.html b/templates/anchor-link.html @@ -1,15 +1,15 @@ <a class="zola-anchor" href="#{{ id | safe }}" aria-label="Anchor link for: {{ id | safe }}"> - {%- if level == 1 -%} + {% if level == 1 %} # - {%- elif level == 2 -%} + {% elif level == 2 %} ## - {%- elif level == 3 -%} + {% elif level == 3 %} ### - {%- elif level == 4 -%} + {% elif level == 4 %} #### - {%- elif level == 5 -%} + {% elif level == 5 %} ##### - {%- elif level == 6 -%} + {% elif level == 6 %} ###### - {%- endif -%} + {% endif %} </a> diff --git a/templates/index.html b/templates/index.html @@ -9,10 +9,10 @@ <meta property="og:title" content="{% if page.title %}{{ page.title | safe }} :: {% endif %}{{ config.title | safe }}"> <meta property="og:description" content="{% if page.description %}{{ page.description | safe }}{% else %}{{ config.description | safe }}{% endif %}"> <meta property="og:type" content="website"> - {%- if current_url %} + {% if current_url %} <meta property="og:url" content="{{ current_url | safe }}"> <link rel="canonical" href="{{ current_url | safe }}"> - {% endif -%} + {% endif %} <meta name="twitter:card" content="summary"> <meta name="twitter:creator" content="@{{ config.extra.d3_twitter | safe }}"> <link rel="icon" href="/icon.png"> @@ -21,13 +21,14 @@ <body> <header> <nav> - {%- for link in config.extra.d3_nav %} + {% for link in config.extra.d3_nav %} <a href="{{ link.path | safe }}">{{ link.name }}</a> - {%- endfor %} + {% endfor %} </nav> <hr> </header> <main> - {%- block content %}{% endblock content %} </main> + {% block content %}{% endblock content %} + </main> </body> </html> diff --git a/templates/list.html b/templates/list.html @@ -1,8 +1,8 @@ {% extends "index.html" %} {% block content %} <ul class="date-list"> - {%- for page in section.pages %} + {% for page in section.pages %} <li><a href="{{ page.permalink | safe }}">{{ page.title | safe }}</a> {{ page.date | date(format="%B %d, %Y") }}</li> - {%- endfor %} + {% endfor %} </ul> {% endblock content %}