Remove some excessive newlines from generated HTML

This commit is contained in:
Philipp Oppermann
2020-02-17 11:22:49 +01:00
parent 127f446856
commit 0e3635f98b
2 changed files with 18 additions and 18 deletions

View File

@@ -1,22 +1,22 @@
{% macro post_link(page) %}
<div>
{% set translations = page.translations | filter(attribute="lang", value=lang) %}
{% if translations %}
{% set post = get_page(path = translations.0.path) %}
{% else %}
{% set post = page %}
{% set not_translated = true %}
{% endif %}
{% set translations = page.translations | filter(attribute="lang", value=lang) -%}
{%- if translations -%}
{%- set post = get_page(path = translations.0.path) -%}
{%- else -%}
{%- set post = page -%}
{%- set not_translated = true -%}
{%- endif -%}
<h2 class="post-title"><a href="/{{ post.path | safe }}">{{ post.title }}</a></h2>
<div class="post-summary">
{{ post.summary | safe}}
{{ post.summary | safe }}
<a class="read-more" href="/{{ post.path | safe }}"><em>read&nbsp;more&nbsp;»</em></a>
{% if lang and not_translated and lang != config.default_language %}
{%- if lang and not_translated and lang != config.default_language -%}
<aside class="no-translation">
(This post is not translated yet.)
</aside>
{% endif %}
{%- endif -%}
</div>
</div>
{% endmacro post_link %}