Web/_includes/nav/blognav.html
Ell 08fc481589
All checks were successful
/ web (push) Successful in 1m1s
move website content to main directory
2024-06-14 17:49:53 +02:00

22 lines
783 B
HTML

{% assign tag = page.tags[0] %}
{% assign posts = site.tags[tag] | where_exp: "post", "post.archived != true" %}
{% for post in posts %}
{% if post.url != page.url %}
{% continue %}
{% endif %}
{% if forloop.last == false %}
{% assign prev = forloop.index0 | plus: 1 %}
{% endif %}
{% if forloop.first == false %}
{% assign next = forloop.index0 | minus: 1 %}
{% endif %}
{% break %}
{% endfor %}
<a class="nav-item nav-link" href="../../#blog-{{ tag | slugify }}">🏠 Back to Main Page</a>
{% if prev %}
<a class="nav-item nav-link" href="{{ posts[prev].url }}">⏮️ Previous in {{ tag }}</a>
{% endif %}
{% if next %}
<a class="nav-item nav-link" href="{{ posts[next].url }}">⏭️ Next in {{ tag }}</a>
{% endif %}