File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 98
98
"items" : {
99
99
"title" : " Path to JavaScript file" ,
100
100
"markdownDescription" : " https://squidfunk.github.io/mkdocs-material/customization/#additional-javascript" ,
101
- "pattern" : " \\ .js($|\\ ?)"
101
+ "pattern" : " \\ .m? js($|\\ ?)"
102
102
},
103
103
"uniqueItems" : true ,
104
104
"minItems" : 1
Original file line number Diff line number Diff line change 242
242
{% block scripts %}
243
243
< script src ="{{ 'assets/javascripts/bundle.b4d07000.min.js' | url }} "> </ script >
244
244
{% for path in config.extra_javascript %}
245
- < script src ="{{ path | url }} "> </ script >
245
+ {% if path.endswith(".mjs") %}
246
+ < script type ="module " src ="{{ path | url }} "> </ script >
247
+ {% else %}
248
+ < script src ="{{ path | url }} "> </ script >
249
+ {% endif %}
246
250
{% endfor %}
247
251
{% endblock %}
248
252
</ body >
Original file line number Diff line number Diff line change 420
420
421
421
<!-- Custom JavaScript -->
422
422
{% for path in config.extra_javascript %}
423
- < script src ="{{ path | url }} "> </ script >
423
+ {% if path.endswith(".mjs") %}
424
+ < script type ="module " src ="{{ path | url }} "> </ script >
425
+ {% else %}
426
+ < script src ="{{ path | url }} "> </ script >
427
+ {% endif %}
424
428
{% endfor %}
425
429
{% endblock %}
426
430
</ body >
You can’t perform that action at this time.
0 commit comments