From 6b626fac61e43894a4c560073ee27ef33e8e6a37 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Fri, 16 Mar 2018 16:44:18 -0400 Subject: [PATCH] Add a tip for testing custom 404.html on hugo server - https://github.com/gohugoio/hugo/issues/874 - https://discourse.gohugo.io/t/how-to-test-404-html-on-local-server/681/2 --- content/templates/404.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/templates/404.md b/content/templates/404.md index 8f6caa3ae..eaa479d29 100644 --- a/content/templates/404.md +++ b/content/templates/404.md @@ -52,4 +52,10 @@ Your 404.html file can be set to load automatically when a visitor enters a mist * Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI. * Caddy Server. Using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors) -[pagevars]: /variables/page/ \ No newline at end of file +{{% note %}} +`hugo server` will not automatically load your custom `404.html` file, but you +can test the appearance of your custom "not found" page by navigating your +browser to `/404.html`. +{{% /note %}} + +[pagevars]: /variables/page/