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 %}
<div class="my-s-m cluster">
{% for tag in tags %}
<a href="/tags/{{ tag }}"> {{ tag }} </a>
<a href="/tags/{{ tag }}/"> {{ tag }} </a>
{% endfor %}
</div>
{% endif %}

View file

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

View file

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

View file

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