mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-12 01:50:52 +01:00
Fixed instant loading when used with use_directory_urls: false
This commit is contained in:
parent
1d790c9000
commit
66a6713523
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -217,7 +217,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.d1d4d62b.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.6946554b.min.js' | url }}"></script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -105,9 +105,9 @@ function preprocess(urls: string[]): string[] {
|
||||
return urls
|
||||
|
||||
/* Take the first two URLs and remove everything after the last slash */
|
||||
const [root, next] = urls.slice(0, 2).map(url => (
|
||||
url.replace(/[^/]+$/, "")
|
||||
))
|
||||
const [root, next] = urls
|
||||
.sort((a, b) => a.length - b.length)
|
||||
.map(url => url.replace(/[^/]+$/, ""))
|
||||
|
||||
/* Compute common prefix */
|
||||
let index = 0
|
||||
|
Loading…
Reference in New Issue
Block a user