Skip to content

Commit

Permalink
Merge pull request #11179 from MisRob/docs-build
Browse files Browse the repository at this point in the history
Update ReadTheDocs builds configuration
  • Loading branch information
rtibbles authored Sep 15, 2023
2 parents cfa4bae + 89b596e commit 19c1d26
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 3 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 19c1d26

Please # to comment.