From df08b518e417e7a8b141740fe7fc4e8bbbf8f957 Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Mon, 28 Oct 2013 16:07:26 -0700 Subject: [PATCH] make js work on non-rtd sites again --- sphinx_rtd_theme/layout.html | 24 ++++++++++++------------ sphinx_rtd_theme/static/theme.js | 10 ++++------ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index de89f0ba..87337a96 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -25,16 +25,6 @@ {# CSS #} - - {# RTD hosts this file themselves, only load for non RTD builds #} - {% if not READTHEDOCS %} - - {% endif %} - - {% for cssfile in css_files %} - - {% endfor %} - {# JS #} {% if not embedded %} @@ -47,7 +37,7 @@ HAS_SOURCE: {{ has_source|lower }} }; - {%- for scriptfile in script_files + ["_static/theme.js"] %} + {%- for scriptfile in script_files %} {%- endfor %} @@ -56,7 +46,17 @@ {% endif %} {% endif %} - + + {# RTD hosts these file themselves, so just load on non RTD builds #} + {% if not READTHEDOCS %} + + + {% endif %} + + {% for cssfile in css_files %} + + {% endfor %} + {%- block linktags %} {%- if hasdoc('about') %}