mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-14 15:14:10 +02:00
29 lines
1.2 KiB
HTML
29 lines
1.2 KiB
HTML
{{- /*
|
|
|
|
A version of the navbar-version-selector.html partial in Docsy,
|
|
modified to read the versions from changelog child pages so that
|
|
we don't have to maintain the menu separately in hugo.toml.
|
|
|
|
*/ -}}
|
|
|
|
{{ $changelog := site.GetPage "changelog" }}
|
|
{{ $pages := $changelog.RegularPages.ByDate.Reverse }}
|
|
|
|
<div class="dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
All Versions
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
{{- /* Prepend a link to the unstable spec version */ -}}
|
|
<li><a class="dropdown-item" href="https://spec.matrix.org/unstable">Unstable</a></li>
|
|
{{- /* Add a link for each vX.X version */ -}}
|
|
{{ range $pages }}
|
|
{{ if findRE `^v[0-9]+\.[0-9]+$` .Params.linkTitle }}
|
|
<li><a class="dropdown-item" href="https://spec.matrix.org/{{ .Params.linkTitle }}">{{ .Params.linkTitle }}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{- /* Append a link to historical spec versions in the changelog */ -}}
|
|
<li><a class="dropdown-item" href="/changelog/historical/">Historical</a></li>
|
|
</ul>
|
|
</div>
|