summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2024-01-15 09:20:45 +0100
committerStefan Kreutz <mail@skreutz.com>2024-01-15 09:51:49 +0100
commitf4cef0c477508d7117293d220b8c6f4213d3eaec (patch)
treefc4b6ab6b7da01a2920d0f4f7648d2ccec512cad
parent50a2c4af20508c4f621160412a11f6641981d4a9 (diff)
downloadblog-f4cef0c477508d7117293d220b8c6f4213d3eaec.tar
Add generic error page for OpenBSD's httpd(8)
-rw-r--r--404.html6
-rw-r--r--err.html6
-rw-r--r--site.hs6
3 files changed, 15 insertions, 3 deletions
diff --git a/404.html b/404.html
index f396e08..2e06f8a 100644
--- a/404.html
+++ b/404.html
@@ -1,6 +1,6 @@
---
-title: Resource not found
+title: Not Found
---
-<h1>Resource not found</h1>
-<p>Can't the find the resource you're looking for. Please <a href="/contact/">contact me</a> if you've found a dead link on this website. Otherwise you might want to go to the <a href="/">home page</a> instead.</p>
+<h1>Not Found</h1>
+<p>Whoops, I can't find the resource you're looking for. Please <a href="/contact/">contact me</a> if you've found a dead link on this website. Otherwise you might want to go to the <a href="/">home page</a> instead.</p>
diff --git a/err.html b/err.html
new file mode 100644
index 0000000..9a31fb7
--- /dev/null
+++ b/err.html
@@ -0,0 +1,6 @@
+---
+title: Error
+---
+
+<h1>$HTTP_ERROR</h1>
+<p>Whoops, something went wrong. Please <a href="/contact/">contact me</a> if you think there's something wrong with this website. Otherwise you might want to go to the <a href="/">home page</a> instead.</p>
diff --git a/site.hs b/site.hs
index 5bc34bb..f125771 100644
--- a/site.hs
+++ b/site.hs
@@ -82,6 +82,12 @@ main = hakyllWith hakyllConfig $ do
>>= loadAndApplyTemplate "templates/default.html" indexContext
-- >>= relativizeUrls
+ match "err.html" $ do
+ route idRoute
+ compile $ pandocCompiler
+ >>= loadAndApplyTemplate "templates/default.html" defaultContext
+ >>= relativizeUrls
+
match "404.html" $ do
route idRoute
compile $ pandocCompiler
Generated by cgit. See skreutz.com for my tech blog and contact information.