From 23f59d9576b02dbe8ddccbdb0f8b4dc714289212 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Sat, 30 Dec 2023 16:04:41 +0000 Subject: [PATCH] Apologise profusely for spam --- src/blog/posts/2023/12/sorry-for-the-spam.md | 10 ++++++++++ src/blog/posts/posts.11tydata.js | 6 +----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 src/blog/posts/2023/12/sorry-for-the-spam.md diff --git a/src/blog/posts/2023/12/sorry-for-the-spam.md b/src/blog/posts/2023/12/sorry-for-the-spam.md new file mode 100644 index 0000000..13dc78c --- /dev/null +++ b/src/blog/posts/2023/12/sorry-for-the-spam.md @@ -0,0 +1,10 @@ +--- +title: Sorry for the spam +date: 2023-12-30 +--- + +If you're subscribed to any of my site feeds, you might have noticed that suddenly you've been flooded with every post I've ever written. + +My bad - I'm removing Wordpress from my setup, which means using Eleventy-generated feeds once again. I've setup Nginx rules so that the existing URLs will all work, but because the Wordpress feeds use the internal wordpress IDs instead of post urls, most feed readers will parse them as brand new posts. + +So... sorry about that! \ No newline at end of file diff --git a/src/blog/posts/posts.11tydata.js b/src/blog/posts/posts.11tydata.js index 4ba8a28..67e7e09 100644 --- a/src/blog/posts/posts.11tydata.js +++ b/src/blog/posts/posts.11tydata.js @@ -1,9 +1,5 @@ module.exports = { tags: ['posts'], layout: 'post.njk', - eleventyComputed: { - permalink: data => { - return `/post/${data.slug}/`; - }, - } + permalink: "/post/{{ data.slug if data.slug else title | slugify }} " } \ No newline at end of file