Skip to content

Commit 0edd842

Browse files
committed
Consider static html _static option in confpy overrides
1 parent e2dbb00 commit 0edd842

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717
import sys
18+
import os.path
1819
from six import string_types
1920

2021
from sphinx import version_info
@@ -57,10 +58,11 @@ else:
5758
'.templates']
5859

5960
# Add RTD Static Path. Add to the end because it overwrites previous files.
60-
if 'html_static_path' in globals():
61-
html_static_path.append('{{ static_path }}')
62-
else:
63-
html_static_path = ['{{ static_path }}']
61+
if not 'html_static_path' in globals():
62+
html_static_path = []
63+
if os.path.exists('_static'):
64+
html_static_path.append('_static')
65+
html_static_path.append('{{ static_path }}')
6466

6567
# Add RTD Theme only if they aren't overriding it already
6668
using_rtd_theme = False

0 commit comments

Comments
 (0)