reduce empty space in compiled blog html

This commit is contained in:
Ell 2024-05-21 21:03:41 +02:00
parent 5978931868
commit 5ab1a6b17d

View file

@ -2,30 +2,30 @@
<h2 class="devlog-category" id="{{ include.tag | slugify }}">{{ include.emoji }} {{ include.tag }}</h2>
<p>{{ include.description }}</p>
{% for post in site.posts %}
{% if post.tags contains include.tag %}
{%- for post in site.posts -%}
{%- if post.tags contains include.tag -%}
<div class="devlog">
{% if post.image %}
{% assign start = post.image | slice: 0, 4 %}
{% if start == "http" %}
{% assign url = post.image %}
{% else %}
{% assign url = post.url | append: post.image %}
{% endif %}
{%- if post.image -%}
{%- assign start = post.image | slice: 0, 4 -%}
{%- if start == "http" -%}
{%- assign url = post.image -%}
{%- else -%}
{%- assign url = post.url | append: post.image -%}
{%- endif -%}
<img src="{{ url }}" class="devlog-image" width="100%" height="120px" alt="Cover image for post {{ post.title }}">
{% endif %}
{%- endif -%}
<h4 class="devlog-title">{{ post.title }}</h4>
<div class="text-muted">{{ post.date | date_to_string }}</div>
<div>
<a href="{{ post.url }}">Read this post</a>
{% if post.itch %}
{%- if post.itch -%}
&ndash; <a href="{{ post.itch }}">Read on itch</a>
{% endif %}
{% if post.steam %}
{%- endif -%}
{%- if post.steam -%}
&ndash; <a href="{{ post.steam }}">Read on Steam</a>
{% endif %}
{%- endif -%}
</div>
</div>
{% endif %}
{% endfor %}
{%- endif -%}
{%- endfor -%}
</div>