aboutsummaryrefslogtreecommitdiffstats
path: root/posts
diff options
context:
space:
mode:
Diffstat (limited to 'posts')
-rw-r--r--posts/posts.11tydata.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/posts/posts.11tydata.js b/posts/posts.11tydata.js
new file mode 100644
index 0000000..e22d809
--- /dev/null
+++ b/posts/posts.11tydata.js
@@ -0,0 +1,10 @@
+import slugify from '@sindresorhus/slugify';
+
+export default _ => {
+ return {
+ layout: "post.html",
+ eleventyComputed: {
+ permalink: data => `posts/${slugify(data.title)}/`
+ }
+ }
+}