Fixed invalid versions.json URL (regression)

This commit is contained in:
squidfunk 2021-08-11 21:17:10 +02:00
parent f869d275b4
commit a855133f16
8 changed files with 12 additions and 12 deletions

View File

@ -223,7 +223,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.143c17e5.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.a0ca7753.min.js' | url }}"></script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}

View File

@ -16,5 +16,5 @@
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{ 'overrides/assets/javascripts/bundle.25c9f9b3.min.js' | url }}"></script>
<script src="{{ 'overrides/assets/javascripts/bundle.515b7185.min.js' | url }}"></script>
{% endblock %}

View File

@ -96,7 +96,7 @@ export interface Config {
*/
const script = getElementOrThrow("#__config")
const config: Config = JSON.parse(script.textContent!)
config.base = new URL(config.base, getLocation()).toString()
config.base = `${new URL(config.base, getLocation())}`
/* ----------------------------------------------------------------------------
* Functions

View File

@ -33,7 +33,7 @@ import { Version, renderVersionSelector } from "~/templates"
*/
export function setupVersionSelector(): void {
const config = configuration()
requestJSON<Version[]>(new URL("versions.json", config.base))
requestJSON<Version[]>(new URL("../versions.json", config.base))
.subscribe(versions => {
const topic = getElementOrThrow(".md-header__topic")
topic.appendChild(renderVersionSelector(versions))