Update docs search plugin (#6810)

This commit is contained in:
Ryan P Kilby 2019-07-16 13:00:45 -07:00 committed by GitHub
parent a4c2d4f0d5
commit 0cb2523927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 9 deletions

View File

@ -9,11 +9,6 @@ var getSearchTerm = function() {
}
};
var initilizeSearch = function() {
require.config({ baseUrl: '/mkdocs/js' });
require(['search']);
};
$(function() {
var searchTerm = getSearchTerm(),
$searchModal = $('#mkdocs_search_modal'),
@ -30,6 +25,5 @@ $(function() {
$searchModal.on('shown', function() {
$searchQuery.focus();
initilizeSearch();
});
});

View File

@ -138,14 +138,17 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
<script src="{{ base_url }}/js/jquery-1.8.1-min.js"></script>
<script src="{{ base_url }}/js/prettify-1.0.js"></script>
<script src="{{ base_url }}/js/bootstrap-2.1.1-min.js"></script>
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
<script>var base_url = '{{ base_url }}';</script>
<script src="{{ base_url }}/mkdocs/js/require.js"></script>
<script src="{{ base_url }}/js/theme.js"></script>
<script>var base_url = '{{ base_url }}';</script>
{% for path in config.extra_javascript %}
<script src="{{ path|url }}" defer></script>
{% endfor %}
<script>
var shiftWindow = function() {
scrollBy(0, -50)