Skip to content

Commit

Permalink
Use the theme for both local and ReadTheDocs builds
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MisRob committed Sep 15, 2023
1 parent 8afda62 commit 63bb0d8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from django.utils.encoding import force_text
from django.utils.html import strip_tags

import sphinx_rtd_theme

# 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
Expand Down Expand Up @@ -164,14 +166,10 @@ 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'

if not False: # 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 = 'default'

html_theme = "sphinx_rtd_theme"
html_theme_path = [".", sphinx_rtd_theme.get_html_theme_path()]

# Approach 2 for custom stylesheet:
# adapted from: http://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
Expand Down

0 comments on commit 63bb0d8

Please sign in to comment.