Back to Goreleaser

G Inline Version

www/layouts/shortcodes/g_inline_version.html

2.15.4872 B
Original Source

{{- $text := .Get 0 -}} {{- $unreleased := strings.HasSuffix $text "-unreleased" -}} {{- if $unreleased -}} {{- $tag := strings.TrimSuffix "-unreleased" $text -}} {{- $content := printf "Since %s (unreleased)" $tag -}} {{- partial "shortcodes/badge.html" (dict "content" $content "color" "indigo" "class" "" "border" true "icon" "beaker" ) -}}{{- /* no empty line */ -}} {{- else -}} {{- $tag := $text -}} {{- $linkTag := $tag -}} {{- $parts := split $tag "." -}} {{- if ge (len $parts) 3 -}} {{- $linkTag = delimit (first 2 $parts) "." -}} {{- end -}} {{- $link := printf "/blog/goreleaser-%s" $linkTag -}} {{- $content := printf "Since %s" $tag -}} {{- partial "shortcodes/badge.html" (dict "content" $content "color" "indigo" "class" "" "border" true "icon" "status-online" ) -}}{{- /* no empty line */ -}} {{- end -}}