]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Switch to furo theme
authorStephen Finucane <stephen@that.guru>
Wed, 28 Jun 2023 09:22:27 +0000 (10:22 +0100)
committerStephen Finucane <stephen@that.guru>
Wed, 28 Jun 2023 09:22:59 +0000 (10:22 +0100)
The sphinx-rtd-theme theme is not compatible with Sphinx 7.x yet.

Signed-off-by: Stephen Finucane <stephen@that.guru>
docs/conf.py
docs/requirements.txt

index 0b303c73f9e2140752fe989dea7795cf249079b3..b86163ede831fff1f515b8ffb322b7b93dc8b211 100644 (file)
@@ -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'
index f6307aca714b3a09d9efd76a32b42accf8bcb4ae..9c844cf27d43a9a8d6318af622a882a1c05ab8fe 100644 (file)
@@ -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