From e1634059a75054c8f7dcc5ece66d1222fb18597c Mon Sep 17 00:00:00 2001 From: Marc Pervaz Boocha Date: Sun, 15 Dec 2024 14:34:00 +0530 Subject: Updated deps --- src/posts/posts.11tydata.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/posts') diff --git a/src/posts/posts.11tydata.js b/src/posts/posts.11tydata.js index f03d0cf..c9924d9 100644 --- a/src/posts/posts.11tydata.js +++ b/src/posts/posts.11tydata.js @@ -1,13 +1,15 @@ import slugify from '@sindresorhus/slugify'; -export default _ => { +export default function () { return { layout: "post", tags: [ "post" ], eleventyComputed: { - permalink: data => `posts/${slugify(data.title)}/` + permalink(data) { + return data.title ? `posts/${slugify(data.title)}/` : `posts/${data.page.fileSlug}/` + }, } } } -- cgit v1.2.3-70-g09d2