fix tag links

This commit is contained in:
Nycki 2024-09-13 21:36:39 +00:00
parent 570abf9d4f
commit 0b06c12072
4 changed files with 9 additions and 9 deletions

View file

@ -7,11 +7,11 @@
<meta name="description" content="{{ description or metadata.description }}">
{#- Atom and JSON feeds included by default #}
<link rel="alternate" href="/feed/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
<link rel="alternate" href="/feed/feed.json" type="application/json" title="{{ metadata.title }}">
<link rel="alternate" href="/blog/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
<link rel="alternate" href="/blog/feed.json" type="application/json" title="{{ metadata.title }}">
{#- Uncomment this if youd like folks to know that you used Eleventy to build your site! #}
{#- <meta name="generator" content="{{ eleventy.generator }}"> #}
<meta name="generator" content="{{ eleventy.generator }}">
{#-
CSS bundles are provided via the `eleventy-plugin-bundle` plugin:

View file

@ -13,7 +13,7 @@ layout: layouts/base.njk
{{ content | safe }}
{%- for tag in tags | filterTagList %}
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
{%- set tagUrl %}/blog/tags/{{ tag | slugify }}/{% endset %}
<a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a>{%- if not loop.last %}, {% endif %}
{%- endfor %}
@ -36,4 +36,4 @@ layout: layouts/base.njk
data-page-title="{{ title | slugify }}"
data-theme="auto"
></div>
<script async defer src="https://cusdis.com/js/cusdis.es.js"></script> #}
<script async defer src="https://cusdis.com/js/cusdis.es.js"></script> #}

View file

@ -1,12 +1,12 @@
---
permalink: /tags/
permalink: /blog/tags/
layout: layouts/home.njk
---
<h1>Tags</h1>
<ul>
{% for tag in collections.all | getAllTags | filterTagList %}
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
{% set tagUrl %}/blog/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a></li>
{% endfor %}
</ul>

View file

@ -12,11 +12,11 @@ pagination:
layout: layouts/home.njk
eleventyComputed:
title: Tagged “{{ tag }}”
permalink: /tags/{{ tag | slugify }}/
permalink: /blog/tags/{{ tag | slugify }}/
---
<h1>Tagged “{{ tag }}”</h1>
{% set postslist = collections[ tag ] %}
{% include "postslist.njk" %}
<p>See <a href="/tags/">all tags</a>.</p>
<p>See <a href="/blog/tags/">all tags</a>.</p>