{{- /* since shortcode Renders a small badge linking to the release where a feature was introduced. The version is taken from, in order of precedence: - the first positional argument: since "2.17.0" - the named "version" argument: since version="2.17.0" - the page's "since" front matter: since = "2.17.0" The link target is built from the printf format string in params.ananke.shortcodes.since.url, which receives the version as its only argument (default: the Ananke releases page). */ -}} {{- $version := or (.Get 0) (.Get "version") .Page.Params.since -}} {{- with $version -}} {{- $urlFormat := site.Params.ananke.shortcodes.since.url | default "https://github.com/gohugo-ananke/ananke/releases/tag/v%s" -}} {{- $url := printf $urlFormat . -}} {{ T "since" }} {{ . }} {{- else -}} {{- warnf "[ananke] the 'since' shortcode in %q needs a version argument or a 'since' front matter value" .Page.File.Path -}} {{- end -}}