diff options
Diffstat (limited to 'src/post/post.11tydata.js')
-rw-r--r-- | src/post/post.11tydata.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/post/post.11tydata.js b/src/post/post.11tydata.js new file mode 100644 index 0000000..68f56d2 --- /dev/null +++ b/src/post/post.11tydata.js @@ -0,0 +1,8 @@ +const slugify = require("@sindresorhus/slugify") + +module.exports = () => ({ + layout: "post.njk", + eleventyComputed: { + permalink: data => `/posts/${slugify(data.title)}/` + } +})
\ No newline at end of file |