site/layouts/shortcodes/product-badge.html
{{- /* site/layouts/shortcodes/product-badge.html Inline product/plan availability badge, for calling out a single gated feature or section inside an otherwise shared page. For whole-page availability, use the products front matter field instead (rendered at the top of the page by partials/product-tags.html). Use this shortcode only when a page is mostly shared across products and just one paragraph, list item, or table cell needs a callout. Usage: {{< product-badge "online,enterprise" >}} {{< product-badge "enterprise" >}} */ -}} {{- $raw := .Get 0 -}} {{- $products := split $raw "," -}} Available in: {{- range $products -}} {{- $p := trim (lower .) " \t\n\r" -}} {{- if eq $p "online" -}} CVAT Online {{- else if eq $p "enterprise" -}} CVAT Enterprise {{- else if eq $p "community" -}} CVAT Community {{- else -}} {{ . }} {{- end -}} {{- end -}}