From 1ba414c3c8768b915ffaf8d4c68504715d50d505 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Wed, 3 Jul 2024 14:24:05 -0700 Subject: [PATCH] fix: artist urls --- _redirects | 6 ------ config/filters/index.js | 1 + src/pages/main/music/artists/artist.html | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/_redirects b/_redirects index bd030885..bc77c08c 100644 --- a/_redirects +++ b/_redirects @@ -48,12 +48,6 @@ /feeds/posts/2024/integrating-a-somewhat-custom-cms-with-eleventy/ /posts/2024/integrating-a-somewhat-custom-cms-with-eleventy/ 301 /feeds/not-allowed /not-allowed 301 -# music -/music/artists/hyperdontia-denmark-turkiye /music/artists/hyperdontia-denmark-tuerkiye 301 -/music/artists/engulfed-turkiye /music/artists/engulfed-tuerkiye 301 -/music/artists/decaying-purity-turkiye /music/artists/decaying-purity-tuerkiye 301 -/music/artists/burial-invocation-turkiye /music/artists/burial-invocation-tuerkiye - # 404s /robot.txt /robots.txt 301 robotx.txt /robots.txt 301 diff --git a/config/filters/index.js b/config/filters/index.js index 282e7905..f9e96dd7 100644 --- a/config/filters/index.js +++ b/config/filters/index.js @@ -23,6 +23,7 @@ export default { replaceQuotes: (string) => string.replace(/"/g, "'"), formatNumber: (number) => number.toLocaleString('en-US'), shuffleArray, + sanitizeMediaString, // navigation isLinkActive: (category, page) => page.includes(category) && page.split('/').filter(a => a !== '').length <= 1, diff --git a/src/pages/main/music/artists/artist.html b/src/pages/main/music/artists/artist.html index c41d1fbb..7e3609ac 100644 --- a/src/pages/main/music/artists/artist.html +++ b/src/pages/main/music/artists/artist.html @@ -4,7 +4,7 @@ pagination: data: artists size: 1 alias: artist -permalink: "/music/artists/{{ artist.name_string | slugify | downcase }}-{{ artist.country | slugify | downcase}}/index.html" +permalink: "/music/artists/{{ artist.name_string | sanitizeMediaString }}-{{ artist.country | sanitizeMediaString }}/index.html" updated: "now" schema: artist ---