mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-30 18:24:35 +01:00
Added compatibility for mkdocs 0.17
This commit is contained in:
parent
badeb7e86f
commit
4060ad09d9
File diff suppressed because one or more lines are too long
1
material/assets/javascripts/application-946997f430.js
Normal file
1
material/assets/javascripts/application-946997f430.js
Normal file
File diff suppressed because one or more lines are too long
@ -164,7 +164,7 @@
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<script src="{{ base_url }}/assets/javascripts/application-268d62d82d.js"></script>
|
||||
<script src="{{ base_url }}/assets/javascripts/application-946997f430.js"></script>
|
||||
{% set languages = lang.t("search.languages").split(",") %}
|
||||
{% if languages | length and languages[0] != "" %}
|
||||
{% set path = base_url + "/assets/javascripts/lunr" %}
|
||||
@ -181,7 +181,7 @@
|
||||
<script src="{{ path }}/lunr.multi.js"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<script>app.initialize({url:{base:"{{ base_url }}"}})</script>
|
||||
<script>app.initialize({version:"{{ mkdocs_version }}",url:{base:"{{ base_url }}"}})</script>
|
||||
{% for path in extra_javascript %}
|
||||
<script src="{{ path }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -18,6 +18,6 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
mkdocs==0.16.3
|
||||
mkdocs>=0.16
|
||||
Pygments>=2.2
|
||||
pymdown-extensions>=3.4
|
||||
|
@ -225,7 +225,9 @@ function initialize(config) { // eslint-disable-line func-style
|
||||
new Material.Event.Listener("[data-md-component=query]", [
|
||||
"focus", "keyup", "change"
|
||||
], new Material.Search.Result("[data-md-component=result]", () => {
|
||||
return fetch(`${config.url.base}/mkdocs/search_index.json`, {
|
||||
return fetch(`${config.url.base}/${
|
||||
config.version < "0.17" ? "mkdocs" : "search"
|
||||
}/search_index.json`, {
|
||||
credentials: "same-origin"
|
||||
}).then(response => response.json())
|
||||
.then(data => {
|
||||
|
@ -320,7 +320,12 @@
|
||||
|
||||
<!-- Initialize application -->
|
||||
<script>
|
||||
app.initialize({ url: { base: "{{ base_url }}" } });
|
||||
app.initialize({
|
||||
version: "{{ mkdocs_version }}",
|
||||
url: {
|
||||
base: "{{ base_url }}"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% for path in extra_javascript %}
|
||||
<script src="{{ path }}"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user