From 137e76fb427bc804e05d099d886874d15c14d787 Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Wed, 29 Jun 2022 12:03:41 -0500 Subject: [PATCH] Switch to use 1.0+ slugify filter instead --- .eleventy.js | 2 +- _includes/layouts/post.njk | 2 +- _includes/postslist.njk | 2 +- tags-list.njk | 2 +- tags.njk | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 757c039..b784e22 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -72,7 +72,7 @@ module.exports = function(eleventyConfig) { symbol: "#" }), level: [1,2,3,4], - slugify: eleventyConfig.getFilter("slug") + slugify: eleventyConfig.getFilter("slugify") }); eleventyConfig.setLibrary("md", markdownLibrary); diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index df4210a..bf2d93f 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -6,7 +6,7 @@ templateClass: tmpl-post {%- for tag in tags | filterTagList %} -{%- set tagUrl %}/tags/{{ tag | slug }}/{% endset %} +{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} {{ tag }} {%- endfor %} diff --git a/_includes/postslist.njk b/_includes/postslist.njk index d220513..ab8327a 100644 --- a/_includes/postslist.njk +++ b/_includes/postslist.njk @@ -4,7 +4,7 @@ {% if post.data.title %}{{ post.data.title }}{% else %}{{ post.url }}{% endif %} {% for tag in post.data.tags | filterTagList %} - {% set tagUrl %}/tags/{{ tag | slug }}/{% endset %} + {% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} {{ tag }} {% endfor %} diff --git a/tags-list.njk b/tags-list.njk index 2553860..f129653 100644 --- a/tags-list.njk +++ b/tags-list.njk @@ -5,6 +5,6 @@ layout: layouts/home.njk

Tags

{% for tag in collections.tagList %} - {% set tagUrl %}/tags/{{ tag | slug }}/{% endset %} + {% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} {{ tag }} {% endfor %} diff --git a/tags.njk b/tags.njk index fa1158b..852d923 100644 --- a/tags.njk +++ b/tags.njk @@ -12,7 +12,7 @@ pagination: layout: layouts/home.njk eleventyComputed: title: Tagged “{{ tag }}” -permalink: /tags/{{ tag | slug }}/ +permalink: /tags/{{ tag | slugify }}/ ---

Tagged “{{ tag }}”