diff --git a/README.md b/README.md index 3e77a22..465f888 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,5 @@ hugo server -F And open http://localhost:1313/ in your browser. Note that the -F flag will show items to be published in the future (like blog posts with dates in the future). + +To view the 404 page when running locally, use /404.html. diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..ed3d6b7 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,3 @@ +{{ define "main"}} +
That page doesn't exist, please check the address.
+{{ end }} diff --git a/netlify.toml b/netlify.toml index 761a81e..2bd3873 100644 --- a/netlify.toml +++ b/netlify.toml @@ -94,3 +94,9 @@ to = "https://www.memorysafety.org/:splat" status = 301 force = true + +[[redirects]] + from = "/*" + to = "/404.html" + status = 404 + force = false