mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-12-02 19:17:21 +01:00
Fixed versioning not working with anchors
This commit is contained in:
parent
4bd89f9fc3
commit
d0f73018f5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -235,7 +235,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.9c69f0bc.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.2ab50757.min.js' | url }}"></script>
|
||||||
{% for path in config["extra_javascript"] %}
|
{% for path in config["extra_javascript"] %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -134,7 +134,7 @@ export function setupVersionSelector(
|
|||||||
map(sitemap => {
|
map(sitemap => {
|
||||||
const location = getLocation()
|
const location = getLocation()
|
||||||
const path = location.href.replace(config.base, "")
|
const path = location.href.replace(config.base, "")
|
||||||
return sitemap.includes(path)
|
return sitemap.includes(path.split("#")[0])
|
||||||
? new URL(`../${version}/${path}`, config.base)
|
? new URL(`../${version}/${path}`, config.base)
|
||||||
: new URL(url)
|
: new URL(url)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user