implement custom 404 page

This commit is contained in:
John Bowdre 2023-08-22 14:10:38 -05:00
parent 814c29b7f4
commit ce5c80ba8f
4 changed files with 19 additions and 2 deletions

12
content/404.md Normal file
View file

@ -0,0 +1,12 @@
+++
title = "404'd!"
noindex = true
layout = "page"
timeless = true
comments = false
+++
We're not sure what you were looking for, but it's not here.
![](/images/nothing-to-see-here.gif)
Maybe head back to the [index](/posts/) and try again?

View file

@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8"/>
{{ if .Site.Params.noindex }}<meta name="robots" content="noindex" /> {{ end }}
{{ if or (.Site.Params.noindex) (.Params.noindex) }}<meta name="robots" content="noindex" /> {{ end }}
{{ partialCached "favicon" . }}
{{ partial "opengraph" . }}

View file

@ -6,3 +6,8 @@
[context.production]
command = "hugo"
[[redirects]]
from = "/*"
to = "/404/"
status = 404

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB