aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/404.11tydata.js8
-rw-r--r--src/404.html12
-rw-r--r--src/posts/posts.11tydata.js4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/404.11tydata.js b/src/404.11tydata.js
new file mode 100644
index 0000000..54720b5
--- /dev/null
+++ b/src/404.11tydata.js
@@ -0,0 +1,8 @@
+export default function() {
+ return {
+ layout: "base",
+ title: "File Not Found",
+ permalink: "404.html",
+ eleventyExcludeFromCollections: true
+ }
+}
diff --git a/src/404.html b/src/404.html
index f6f9c15..372edc1 100644
--- a/src/404.html
+++ b/src/404.html
@@ -1,13 +1,7 @@
----json
-{
-"layout": "base",
-"title": "File Not Found",
-"permalink": "404.html",
-"eleventyExcludeFromCollections": true
-}
----
<style>
-h1 { color: red; }
+ h1 {
+ color: red;
+ }
</style>
<h1>ERROR: 404</h1>
diff --git a/src/posts/posts.11tydata.js b/src/posts/posts.11tydata.js
index c9924d9..d7e86d1 100644
--- a/src/posts/posts.11tydata.js
+++ b/src/posts/posts.11tydata.js
@@ -1,5 +1,3 @@
-import slugify from '@sindresorhus/slugify';
-
export default function () {
return {
layout: "post",
@@ -8,7 +6,7 @@ export default function () {
],
eleventyComputed: {
permalink(data) {
- return data.title ? `posts/${slugify(data.title)}/` : `posts/${data.page.fileSlug}/`
+ return data.title ? `posts/${this.slugify(data.title)}/` : `posts/${data.page.fileSlug}/`
},
}
}