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 diff --git a/docs/conf.py b/docs/conf.py index db87269a5eb..488a87e8d40 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,9 @@ 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" - -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