8 lines
414 B
HTML
8 lines
414 B
HTML
{{- $productPathData := findRE "[^/]+.*?" .Page.RelPermalink -}}
|
|
{{- $currentVersion := replaceRE "v" "" (index $productPathData 1) -}}
|
|
{{- $keep := .Get "keep" | default false -}}
|
|
{{- $keepClass := cond ( $keep ) " keep" "" -}}
|
|
{{- $isCloud := in $currentVersion "cloud" -}}
|
|
{{- $versionText := cond ($isCloud) "Cloud" $currentVersion -}}
|
|
<span class="current-version{{ $keepClass }}">{{- $versionText -}}</span>
|