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 }}"> <meta name="description" content="{{ description or metadata.description }}">
{#- Atom and JSON feeds included by default #} {#- 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="/blog/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.json" type="application/json" title="{{ metadata.title }}">
{#- Uncomment this if youd like folks to know that you used Eleventy to build your site! #} {#- 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: CSS bundles are provided via the `eleventy-plugin-bundle` plugin:

View file

@ -13,7 +13,7 @@ layout: layouts/base.njk
{{ content | safe }} {{ content | safe }}
{%- for tag in tags | filterTagList %} {%- 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 %} <a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a>{%- if not loop.last %}, {% endif %}
{%- endfor %} {%- endfor %}

View file

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

View file

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