mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-18 09:04:09 +02:00
Convert versions.js to a template to resolve the correct path of /changelog/historical
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
1a813ff434
commit
5fe78ced53
|
|
@ -74,5 +74,5 @@ fetch("/versions.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
// For historical versions, simply link to the changelog
|
// For historical versions, simply link to the changelog
|
||||||
appendVersion(ul, "historical", "/changelog/historical/");
|
appendVersion(ul, "historical", '{{ (site.GetPage "changelog/historical").RelPermalink }}');
|
||||||
});
|
});
|
||||||
|
|
@ -8,5 +8,10 @@
|
||||||
*/}}
|
*/}}
|
||||||
{{ $toc := resources.Get "js/toc.js" -}}
|
{{ $toc := resources.Get "js/toc.js" -}}
|
||||||
<script defer src="{{ $toc.RelPermalink }}"></script>
|
<script defer src="{{ $toc.RelPermalink }}"></script>
|
||||||
{{ $versions := resources.Get "js/versions.js" -}}
|
|
||||||
<script defer src="{{ $versions.RelPermalink }}"></script>
|
{{- /* Load the versions script template, run and publish it */ -}}
|
||||||
|
{{ with resources.Get "js/versions.template.js" }}
|
||||||
|
{{ with resources.ExecuteAsTemplate "js/versions.js" $ . }}
|
||||||
|
<script defer src="{{ .RelPermalink }}"></script>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,6 @@
|
||||||
All Versions
|
All Versions
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu" id="version-selector">
|
<ul class="dropdown-menu" id="version-selector">
|
||||||
{{- /* The menu is built by version.js */ -}}
|
{{- /* The menu is built by versions.template.js */ -}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue