From: Stephen Finucane Date: Wed, 28 Jun 2023 09:22:27 +0000 (+0100) Subject: docs: Switch to furo theme X-Git-Tag: v3.2.0~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54acae963068a465f1bef84afd7d2c77d7f5ed7f;p=thirdparty%2Fpatchwork.git docs: Switch to furo theme The sphinx-rtd-theme theme is not compatible with Sphinx 7.x yet. Signed-off-by: Stephen Finucane --- diff --git a/docs/conf.py b/docs/conf.py index 0b303c73..b86163ed 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,16 +1,20 @@ -# -*- coding: utf-8 -*- -# # Patchwork documentation build configuration file import os import sys +try: + import furo # noqa + + has_furo_theme = True +except ImportError: + has_furo_theme = False + PATCHWORK_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) sys.path.insert(0, PATCHWORK_DIR) from patchwork import VERSION # noqa - # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -20,17 +24,18 @@ needs_sphinx = '1.5' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.todo', 'reno.sphinxext', 'sphinxcontrib.openapi'] - -# The theme to use for HTML and HTML Help pages. -html_theme = 'sphinx_rtd_theme' +extensions = [ + 'reno.sphinxext', + 'sphinx.ext.todo', + 'sphinxcontrib.openapi', +] # The master toctree document. master_doc = 'index' # General information about the project. project = 'Patchwork' -copyright = '2018-, Patchwork Developers' +copyright = '2018-present, Patchwork Developers' author = 'Patchwork Developers' # The version info for the project you're documenting, acts as replacement for @@ -47,3 +52,11 @@ pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +if has_furo_theme: + html_theme = 'furo' diff --git a/docs/requirements.txt b/docs/requirements.txt index f6307aca..9c844cf2 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ -sphinx>=4.2.0 -reno>=3.4.0 -sphinx-rtd-theme~=1.0 -jinja2~=3.0 -sphinxcontrib-openapi~=0.8.1 +sphinx +reno +furo +jinja2 +sphinxcontrib-openapi