From f0388cab0d729565fac34d4b60c7dcd7c67d6dd2 Mon Sep 17 00:00:00 2001 From: Jared Dillard Date: Mon, 8 Jun 2020 21:32:49 -0700 Subject: [PATCH] Add warning about local web server --- docs/faq.rst | 9 +++++++++ docs/installation.rst | 3 +++ 2 files changed, 12 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index fb14e7e..5ce2732 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -21,6 +21,15 @@ You may want to set ``notfound_no_urls_prefix`` to ``True`` and then add ``perma .. _YAML front matter: http://jekyllrb.com/docs/frontmatter/ +Why is my local web server not showing a 404.html? +-------------------------------------------------- + +Simple web servers, such as ``http.server``, don't have a default handler for 404 +codes, so it doesn't know to point to the generated ``404.html``. + +To see an example of adding a custom request handler for 404 codes, see: +https://stackoverflow.com/questions/22467908/python-simplehttpserver-404-page + The answer I'm looking for is not here -------------------------------------- diff --git a/docs/installation.rst b/docs/installation.rst index 55c9809..831fbbc 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -44,6 +44,9 @@ you can build your documentation again and you will see a new file called ``404. Do not worry too much about this, this is the expected behavior and those resources will appear once the docs are deployed. + If you can't see the 404.html file using a local simple web server, it is + most likely because they often don't support requests for 404 codes. Refer to + the :doc:`faq` for more information. .. note::