зеркало из https://github.com/mozilla/treeherder.git
Bug 1085579 - Docs: Use the Read the Docs theme for local builds too
Using the instructions from: https://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
This commit is contained in:
Родитель
b052a39353
Коммит
76c5b0de69
|
@ -109,7 +109,14 @@ pygments_style = 'sphinx'
|
|||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
|
||||
if not os.environ.get('READTHEDOCS'):
|
||||
# Only import and set the theme if we're building docs locally:
|
||||
# https://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
import sphinx_rtd_theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
|
||||
|
||||
# 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
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
# would not help those who wish to build the docs locally.
|
||||
|
||||
Sphinx
|
||||
sphinx-rtd-theme
|
||||
sphinxcontrib-httpdomain
|
||||
|
|
Загрузка…
Ссылка в новой задаче