mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added support for MkDocs 1.5
Co-authored-by: oprypin <371383+oprypin@users.noreply.github.com>
This commit is contained in:
parent
4bb8926686
commit
e897b89125
@ -241,11 +241,11 @@
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.220ee61c.min.js' | url }}"></script>
|
||||
{% for path in config.extra_javascript %}
|
||||
{% if path.endswith(".mjs") %}
|
||||
<script type="module" src="{{ path | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
{% if script.path %}
|
||||
{{ script | script_tag }}
|
||||
{% else %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
<script src="{{ script | url }}"></script>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
@ -419,11 +419,13 @@
|
||||
<script src="{{ 'assets/javascripts/bundle.js' | url }}"></script>
|
||||
|
||||
<!-- Custom JavaScript -->
|
||||
{% for path in config.extra_javascript %}
|
||||
{% if path.endswith(".mjs") %}
|
||||
<script type="module" src="{{ path | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
|
||||
<!-- Detected MkDocs 1.5+ which has `script.path` and `script_tag` -->
|
||||
{% if script.path %}
|
||||
{{ script | script_tag }}
|
||||
{% else %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
<script src="{{ script | url }}"></script>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user