Skip to content

Commit

Permalink
doc_builder: make it possible to use a different default theme
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx committed Jun 26, 2018
1 parent caa1d2b commit d997818
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions readthedocs/doc_builder/backends/sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def get_config_params(self):
downloads = api.version(self.version.pk).get()['downloads']

data = {
'html_theme': 'sphinx_rtd_theme',
'html_theme_import': 'sphinx_rtd_theme',
'current_version': self.version.verbose_name,
'project': self.project,
'version': self.version,
Expand Down
8 changes: 4 additions & 4 deletions readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ using_rtd_theme = (
) or 'html_theme' not in globals()
)
if using_rtd_theme:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
theme = __import__('{{ html_theme_import }}')
html_theme = '{{ html_theme }}'
html_style = None
html_theme_options = {}
if 'html_theme_path' in globals():
html_theme_path.append(sphinx_rtd_theme.get_html_theme_path())
html_theme_path.append(theme.get_html_theme_path())
else:
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_path = [theme.get_html_theme_path()]

if globals().get('websupport2_base_url', False):
websupport2_base_url = '{{ api_host }}/websupport'
Expand Down

0 comments on commit d997818

Please sign in to comment.