Files
2026-07-13 11:58:46 +08:00

30 lines
893 B
HTML

{{/*
Renders an admonition or badge indicating the version in which a feature was deprecated.
To render an admonition, include descriptive text between the opening and closing
tags. To render a badge, omit the descriptive text and call the shortcode with a
self-closing tag.
@param {string} 0 The semantic version string, with or without a leading v.
@example {{< deprecated-in 0.144.0 />}}
@example {{< deprecated-in 0.144.0 >}}
Some descriptive text here.
{{< /deprecated-in >}}
*/}}
{{- with $version := .Get 0 | strings.TrimLeft "vV" }}
{{- partial "layouts/blocks/feature-state.html" (dict
"inner" (strings.TrimSpace $.Inner)
"name" $.Name
"page" $.Page
"position" $.Position
"status" "deprecated"
"version" $version
)
}}
{{- else }}
{{- errorf "The %q shortcode requires a single positional parameter indicating version. See %s" .Name .Position }}
{{- end }}