minetestblog.github.io/_layouts/blog-by-tag.html

48 lines
1.2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: default
---
{% capture page_subtitle %}
{% if page.description %}
{% capture desc %}{{ page.description }}{% endcapture %}
{{ desc | markdownify }}
{% else %}
Articles tagged with <strong>#{{ page.name }}</strong>
{% endif %}
{% endcapture %}
{% include page/title.html title=page.name subtitle=page_subtitle %}
{% if site.tags[page.slug] %}
{% for post in site.tags[page.slug] %}
{% assign currentdate = post.date | date: "%Y/%m" %}
{% if currentdate != date %}
{% unless forloop.first %}
</ul>
{% endunless %}
<h2 id="y{{post.date | date: "%Y/%m"}}">{% include utils/date_custom_short.html date = post.date %}</h2>
<ul class="related-posts">
{% assign date = currentdate %}
{% endif %}
<li>
<a href="{{ post.url | prepend: site.baseurl }}">
<span>{{ post.title }}</span>
<small>{{ post.date | date: "%d/%m" }}</small>
</a>
</li>
{% if forloop.last %}
</ul>
{% endif %}
{% endfor %}
{% else %}
<p>There are no posts in this tag.</p>
{% endif %}
{% include utils/tag-box.html %}