Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 93aa971

Browse files
authored
Merge pull request #58 from stsewd/fix-singlehtml-builder
Include readthedocssinglehtml to online builders
2 parents 8e54554 + 10bbe82 commit 93aa971

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

readthedocs_ext/readthedocs.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242

4343
def finalize_media(app):
44-
""" Point media files at our media server. """
44+
"""Point media files at our media server."""
4545

4646
if (app.builder.name == 'readthedocssinglehtmllocalmedia' or
4747
app.builder.format != 'html' or
@@ -65,12 +65,15 @@ def update_body(app, pagename, templatename, context, doctree):
6565
"""
6666

6767
STATIC_URL = context.get('STATIC_URL', DEFAULT_STATIC_URL)
68+
online_builders = [
69+
'readthedocs', 'readthedocsdirhtml', 'readthedocssinglehtml'
70+
]
6871
if app.builder.name == 'readthedocssinglehtmllocalmedia':
6972
if 'html_theme' in context and context['html_theme'] == 'sphinx_rtd_theme':
7073
theme_css = '_static/css/theme.css'
7174
else:
7275
theme_css = '_static/css/badge_only.css'
73-
elif app.builder.name in ['readthedocs', 'readthedocsdirhtml']:
76+
elif app.builder.name in online_builders:
7477
if 'html_theme' in context and context['html_theme'] == 'sphinx_rtd_theme':
7578
theme_css = '%scss/sphinx_rtd_theme.css' % STATIC_URL
7679
else:

0 commit comments

Comments
 (0)