Frequently Asked Questions
Does this extension work with Read the Docs?
Yes.
Read the Docs should detect the 404.html
page generated by the extension automatically,
and serve it when a user hits a not found page.
If you are using a Single Version project,
you may want to set notfound_urls_prefix
to None
.
Does this extension work with GitHub pages?
Yes.
You may want to set notfound_urls_prefix
to None
,
and then add permalink: /404.html
in the YAML front matter.
If you are using the github provided domain, make sure to set the notfound_urls_prefix
to your repository’s name in between two forward slashes. For example if your repository is named MyRepo
, then notfound_urls_prefix = "/MyRepo/"
.
Does this extension work with Jupyter Book?
Yes.
You need to enable sphinx-notfound-page
in your Jupyter Book _config.yml
as a custom extension.
It would look like similar to the following:
sphinx:
extra_extensions:
- notfound.extension
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
😢
Please, open an issue in our issue tracker, and let us know what’s the problem you are having.