aboutsummaryrefslogtreecommitdiffstats
path: root/src/posts
diff options
context:
space:
mode:
author2024-12-15 14:34:00 +0530
committer2024-12-15 14:34:00 +0530
commite1634059a75054c8f7dcc5ece66d1222fb18597c (patch)
tree4b58bae881fb11c649f97f91ace6c6f96ab93a25 /src/posts
parentDeal with inaccesible public dir and missing sitemap (diff)
downloadsudomsg-e1634059a75054c8f7dcc5ece66d1222fb18597c.tar
sudomsg-e1634059a75054c8f7dcc5ece66d1222fb18597c.tar.gz
sudomsg-e1634059a75054c8f7dcc5ece66d1222fb18597c.tar.bz2
sudomsg-e1634059a75054c8f7dcc5ece66d1222fb18597c.tar.lz
sudomsg-e1634059a75054c8f7dcc5ece66d1222fb18597c.tar.xz
sudomsg-e1634059a75054c8f7dcc5ece66d1222fb18597c.tar.zst
sudomsg-e1634059a75054c8f7dcc5ece66d1222fb18597c.zip
Updated deps
Diffstat (limited to 'src/posts')
-rw-r--r--src/posts/posts.11tydata.js6
1 files changed, 4 insertions, 2 deletions
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}/`
+ },
}
}
}