matrix-spec/layouts/_partials/version-banner.html
Kévin Commaille f7f641aae7
Move and update layouts
A big change for template paths landed in Hugo 0.146.0.

In `layouts`, we:

- remove `_default` and move everything in it directly under `layouts`
- rename `partials` and `shortcodes` to `_partials` and `_shortcodes`
- adapt to Hugo and docsy changes about the render-heading hook.
  We don't need a copy of the heading self-link template now that it is
  defined as a partial.
- update `docs/baseof.html` to match a change upstream
- split `docs/changelog.html` because it doesn't work for the section
  page anymore. We create a `changelog-index` layout for this.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-06-09 10:44:27 +02:00

23 lines
802 B
HTML

{{/*
A modified version of the version-banner.html partial in Docsy.
*/}}
{{ $color := "primary" }}
{{ $status := .Site.Params.version.status }}
{{ $latest_version := .Site.Params.version.current_version_url }}
{{ if eq $status "unstable"}}
<div class="pageinfo pageinfo-{{ $color }} pageinfo-unstable">
<p>You're looking at an unstable version of this specification.
Unstable specifications may change at any time without notice.</p>
<p><a href="{{ $latest_version | safeURL }}">Switch to the current stable release</a>.</p>
</div>
{{ else if eq $status "historical" }}
<div class="pageinfo pageinfo-{{ $color }}">
<p>You're looking at an old version of this specification.<p>
<p><a href="{{ $latest_version | safeURL }}">Switch to the current stable release</a>.</p>
</div>
{{ end }}