mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-23 19:44:09 +01:00
Now that we use .RenderShortcodes in the rver-fragment shortcode, we cannot remove the output of these shortcodes dynamically because they are replaced by a temporary placeholder due to Hugo's internals. Instead, since the `this` parameter was only used for room version, we always use the `v` parameter and compare with the version provided in the page's front matter. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
10 lines
252 B
HTML
10 lines
252 B
HTML
{{- $ver := .Params.v -}}
|
|
|
|
{{- with page.Params.version -}}
|
|
{{- if eq $ver . -}}
|
|
<span><strong>[Changed in this version]</strong></span>
|
|
{{- end -}}
|
|
{{- else -}}
|
|
<span><strong>[Changed in <code>v{{ $ver }}</code>]</strong></span>
|
|
{{- end -}}
|