python-sphinx_rtd_theme/python-sphinx_rtd_theme-script.patch

40 lines
1.4 KiB
Diff
Raw Normal View History

Remove deprecated use of script_files
Fixes sphinx-doc/sphinx#6088
* Add script block
* Fix build error
--- sphinx_rtd_theme/layout.html.orig 2019-02-12 12:37:47.000000000 -0700
+++ sphinx_rtd_theme/layout.html 2019-08-06 09:02:26.103136905 -0600
@@ -29,6 +29,7 @@
{% endif %}
{# JAVASCRIPTS #}
+ {%- block scripts %}
<script type="text/javascript" src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>
{%- if not embedded %}
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
@@ -62,6 +63,7 @@
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- endif %}
+ {%- endblock %}
{# CSS #}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
--- sphinx_rtd_theme/search.html.orig 2019-02-12 12:37:47.000000000 -0700
+++ sphinx_rtd_theme/search.html 2019-08-06 09:03:25.597117851 -0600
@@ -9,7 +9,10 @@
#}
{%- extends "layout.html" %}
{% set title = _('Search') %}
-{% set script_files = script_files + ['_static/searchtools.js'] %}
+{%- block scripts %}
+ {{ super() }}
+ <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
+{%- endblock %}
{% block footer %}
<script type="text/javascript">
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });