Skip to content

Commit

Permalink
Be more defensive in getting the theme name
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfischer committed Apr 18, 2018
1 parent ab030ce commit c0a57f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion readthedocs/doc_builder/backends/mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ def append_conf(self, **__):

def generate_rtd_data(self, docs_dir, mkdocs_config):
"""Generate template properties and render readthedocs-data.js."""
theme_name = mkdocs_config.get('theme_dir', 'readthedocs').rsplit('/')[-1]
# Get the theme name
theme_name = 'readthedocs'
theme_dir = mkdocs_config.get('theme_dir')
if theme_dir:
theme_name = theme_dir.rstrip('/').split('/')[-1]

# Will be available in the JavaScript as READTHEDOCS_DATA.
readthedocs_data = {
Expand Down

0 comments on commit c0a57f7

Please sign in to comment.