1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
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 :confval:`notfound_urls_prefix` to ``None``.
Does this extension work with GitHub pages?
-------------------------------------------
Yes.
You may want to set :confval:`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 :confval:`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/"``.
.. _YAML front matter: http://jekyllrb.com/docs/frontmatter/
Does this extension work with `Jupyter Book`_?
----------------------------------------------
.. _Jupyter Book: https://jupyterbook.org/
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:
.. code-block:: yaml
sphinx:
extra_extensions:
- notfound.extension
.. _custom extension: https://jupyterbook.org/en/stable/advanced/sphinx.html#custom-sphinx-extensions
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
--------------------------------------
|:cry:|
Please, `open an issue in our issue tracker`_,
and let us know what's the problem you are having.
.. _open an issue in our issue tracker: https://github.com/readthedocs/sphinx-notfound-page/issues/new
|