mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Remove some excessive newlines from generated HTML
This commit is contained in:
@@ -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 more »</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 %}
|
||||
|
||||
Reference in New Issue
Block a user