This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4720ae2fb Also use sphinx_rtd_theme on ReadtheDocs. This is needed
with the latest version of the sphinx-rtd-theme Python package.
4720ae2fb is described below
commit 4720ae2fb45abe40f94854803d59e4d0cff70dcb
Author: Tomaz Muraus <[email protected]>
AuthorDate: Tue Jun 18 16:55:49 2024 +0200
Also use sphinx_rtd_theme on ReadtheDocs. This is needed with the latest
version of the sphinx-rtd-theme Python package.
---
docs/conf.py | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index 0232e4415..33584caea 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -24,9 +24,6 @@ from sphinx.domains.python import PythonDomain
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.abspath(BASE_DIR)
-# Detect if we are running on read the docs
-on_rtd = os.environ.get("READTHEDOCS", "").lower() == "true"
-
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -39,10 +36,12 @@ sys.path.insert(0, os.path.abspath("../"))
# 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.autodoc", "sphinx.ext.intersphinx",
"sphinx.ext.viewcode"]
-
-if not on_rtd:
- extensions.append("sphinx_rtd_theme")
+extensions = [
+ "sphinx.ext.autodoc",
+ "sphinx.ext.intersphinx",
+ "sphinx.ext.viewcode",
+ "sphinx_rtd_theme",
+]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
@@ -115,15 +114,10 @@ pygments_style = "sphinx"
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
+import sphinx_rtd_theme
-if on_rtd:
- html_theme = "default"
- RTD_NEW_THEME = True
-else:
- 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