mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03: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>
|
||||
{% endblock %}
|
||||
{% 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"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -134,7 +134,7 @@ export function setupVersionSelector(
|
||||
map(sitemap => {
|
||||
const location = getLocation()
|
||||
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(url)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user