Browse Source

doc: fix 404 page

Sphinx handling of 404 page is not that easy when using theme
customizations. Enabled the `sphinx-notfound-page` extension (maintained
by readthedocs) to fix its displaying.

Also adjusted Zephyr logo (was causing some Sphinx processing errors
when trying to scale it).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
pull/35478/head
Gerard Marull-Paretas 4 years ago committed by Anas Nashif
parent
commit
95d8d2cc58
  1. 1
      doc/404.rst
  2. 5
      doc/conf.py
  3. BIN
      doc/images/Zephyr-Kite-in-tree.png
  4. 1
      scripts/requirements-doc.txt

1
doc/404.rst

@ -7,7 +7,6 @@ Sorry, Page Not Found
.. image:: images/Zephyr-Kite-in-tree.png .. image:: images/Zephyr-Kite-in-tree.png
:align: right :align: right
:scale: 25%
.. raw:: html .. raw:: html

5
doc/conf.py

@ -82,6 +82,7 @@ extensions = [
"sphinx_tabs.tabs", "sphinx_tabs.tabs",
"zephyr.warnings_filter", "zephyr.warnings_filter",
"zephyr.doxyrunner", "zephyr.doxyrunner",
"notfound.extension",
] ]
# Only use SVG converter when it is really needed, e.g. LaTeX. # Only use SVG converter when it is really needed, e.g. LaTeX.
@ -203,6 +204,10 @@ html_redirect_pages = redirects.REDIRECTS
warnings_filter_config = str(ZEPHYR_BASE / "doc" / "known-warnings.txt") warnings_filter_config = str(ZEPHYR_BASE / "doc" / "known-warnings.txt")
warnings_filter_silent = False warnings_filter_silent = False
# -- Options for notfound.extension ---------------------------------------
notfound_urls_prefix = f"/{version}/"
# -- Linkcheck options ---------------------------------------------------- # -- Linkcheck options ----------------------------------------------------
extlinks = { extlinks = {

BIN
doc/images/Zephyr-Kite-in-tree.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 KiB

After

Width:  |  Height:  |  Size: 110 KiB

1
scripts/requirements-doc.txt

@ -6,6 +6,7 @@ sphinx_rtd_theme>=0.5.2,<1.0
sphinx-tabs sphinx-tabs
sphinxcontrib-svg2pdfconverter sphinxcontrib-svg2pdfconverter
pygments~=2.9 pygments~=2.9
sphinx-notfound-page>=0.6
# Used by zephyr_module # Used by zephyr_module
pykwalify pykwalify

Loading…
Cancel
Save