sphinx: adopt kernel readthedoc theme

The default "alabaster" sphinx theme has a couple shortcomings:
- the navbar moves along the page
- the search bar is not always at the same place
- it lacks some contrast and colours

The "rtd" theme from readthedocs.org is a popular third party theme used
notably by the kernel, with a custom style sheet. I like it better,
perhaps others do too. It also simplifies the "Edit on Gitlab" links.

Tweak a bit the custom theme to match qemu.org style, use the
QEMU logo, and favicon etc.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20210323115328.4146052-1-marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Marc-André Lureau 2021-03-23 15:53:28 +04:00
parent 2d3fc4e2b0
commit 73e6aec652
16 changed files with 200 additions and 59 deletions

View file

@ -27,10 +27,9 @@ if sphinx_build.found()
build_docs = (sphinx_build_test_out.returncode() == 0)
if not build_docs
warning('@0@ is either too old or uses too old a Python version'
.format(sphinx_build.full_path()))
warning('@0@: @1@'.format(sphinx_build.full_path(), sphinx_build_test_out.stderr()))
if get_option('docs').enabled()
error('Install a Python 3 version of python-sphinx')
error('Install a Python 3 version of python-sphinx and the readthedoc theme')
endif
endif
endif