From aba22243c76a4b7a815bae346aafc7fb9a7e4219 Mon Sep 17 00:00:00 2001 From: MisRob Date: Tue, 29 Aug 2023 16:35:23 +0200 Subject: [PATCH 1/3] Add the ReadTheDocs configuration file ReadTheDocs will soon stop supporting projects with no configuration file. https://blog.readthedocs.com/migrate-configuration-v2/ --- .readthedocs.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000000..42bf74b645d --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,11 @@ +version: 2 +formats: all +build: + os: ubuntu-22.04 + tools: + python: "3.11" +sphinx: + configuration: docs/conf.py +python: + install: + - requirements: requirements/docs.txt From 424472cf0b18a5f897afa8021a5671d607f60713 Mon Sep 17 00:00:00 2001 From: MisRob Date: Fri, 15 Sep 2023 12:06:59 +0200 Subject: [PATCH 2/3] Use the theme for both local and ReadTheDocs builds The theme was previously enabled only for local builds, probably because it was applied by default by ReadTheDocs before they started shifting towards requiring explicit configuration in general. --- docs/conf.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index db87269a5eb..632f53adb82 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,6 +9,7 @@ from datetime import datetime import django +import sphinx_rtd_theme from django.utils.encoding import force_text from django.utils.html import strip_tags @@ -135,15 +136,11 @@ def process_docstring(app, what, name, obj, options, lines): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "default" -on_rtd = os.environ.get("READTHEDOCS", None) == "True" +# html_theme = "default" +# on_rtd = os.environ.get("READTHEDOCS", None) == "True" - -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - - html_theme = "sphinx_rtd_theme" - html_theme_path = [".", sphinx_rtd_theme.get_html_theme_path()] +html_theme = "sphinx_rtd_theme" +html_theme_path = [".", sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the From 89b596e6301f86d317e64799e70bc9e37407ccf5 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Fri, 15 Sep 2023 11:58:45 -0700 Subject: [PATCH 3/3] Remove commented out code. --- docs/conf.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 632f53adb82..488a87e8d40 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -136,8 +136,6 @@ def process_docstring(app, what, name, obj, options, lines): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# html_theme = "default" -# on_rtd = os.environ.get("READTHEDOCS", None) == "True" html_theme = "sphinx_rtd_theme" html_theme_path = [".", sphinx_rtd_theme.get_html_theme_path()]