From f4cef0c477508d7117293d220b8c6f4213d3eaec Mon Sep 17 00:00:00 2001 From: Stefan Kreutz Date: Mon, 15 Jan 2024 09:20:45 +0100 Subject: Add generic error page for OpenBSD's httpd(8) --- 404.html | 6 +++--- err.html | 6 ++++++ site.hs | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 err.html 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 --- -

Resource not found

-

Can't the find the resource you're looking for. Please contact me if you've found a dead link on this website. Otherwise you might want to go to the home page instead.

+

Not Found

+

Whoops, I can't find the resource you're looking for. Please contact me if you've found a dead link on this website. Otherwise you might want to go to the home page instead.

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 +--- + +

$HTTP_ERROR

+

Whoops, something went wrong. Please contact me if you think there's something wrong with this website. Otherwise you might want to go to the home page instead.

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 -- cgit v1.2.3