fix: ensure tag links have trailing slashes to avoid redirect issues

This commit is contained in:
madrilene 2025-06-02 09:56:06 +02:00
parent 00455bba87
commit b8eaeadecb
4 changed files with 7 additions and 7 deletions

View file

@ -1,7 +1,7 @@
{% if tags.size > 1 %} {% if tags.size > 1 %}
<div class="my-s-m cluster"> <div class="my-s-m cluster">
{% for tag in tags %} {% for tag in tags %}
<a href="/tags/{{ tag }}"> {{ tag }} </a> <a href="/tags/{{ tag }}/"> {{ tag }} </a>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}

View file

@ -14,9 +14,9 @@ schema: BlogPosting
<p class="meta | cluster gutter-xs-s"> <p class="meta | cluster gutter-xs-s">
<!-- draft status --> <!-- draft status -->
{%- if draft -%}<span class="button" data-small-button data-button-variant="tertiary" {%- if draft -%}
>draft</span <span class="button" data-small-button data-button-variant="tertiary">draft</span>
>{%- endif %} {%- endif %}
<!-- date --> <!-- date -->
{% set definedDate = date %} {% include "partials/date.njk" %} {% set definedDate = date %} {% include "partials/date.njk" %}
{% {%
@ -25,7 +25,7 @@ schema: BlogPosting
%} %}
<!-- tags --> <!-- tags -->
{% for tag in tags %}{% if tag != "posts" %} {% for tag in tags %}{% if tag != "posts" %}
<a class="button" href="/tags/{{ tag }}" data-small-button> {{ tag }} </a> <a class="button" href="/tags/{{ tag }}/" data-small-button> {{ tag }} </a>
{% endif %}{% endfor %} {% endif %}{% endfor %}
{% endif %} {% endif %}
</p> </p>

View file

@ -23,7 +23,7 @@ eleventyComputed:
{% for tag in collections.tagList %} {% for tag in collections.tagList %}
<li> <li>
<a <a
href="/tags/{{ tag }}" href="/tags/{{ tag }}/"
class="button" class="button"
{{ {{
helpers.getLinkActiveState('/tags/' + tag, helpers.getLinkActiveState('/tags/' + tag,

View file

@ -7,7 +7,7 @@ eleventyComputed:
<div class="taglist | mt-s-m cluster"> <div class="taglist | mt-s-m cluster">
{% for tag in collections.tagList %} {% for tag in collections.tagList %}
<a href="/tags/{{ tag }}" class="button"> {{ tag }} </a> <a href="/tags/{{ tag }}/" class="button"> {{ tag }} </a>
{% endfor %} {% endfor %}
</div> </div>