Files
David Karlsson 90e2cb52fa chore: migrate to Hugo v0.146.0 new template lookup system
- layouts/partials/ → layouts/_partials/
- layouts/shortcodes/ → layouts/_shortcodes/
- layouts/_default/_markup/ → layouts/_markup/
- layouts/_default/*.html → layouts/*.html (flatten _default/)
- layouts/index.html → layouts/home.html
- layouts/index.*.json/txt → layouts/home.*.json/txt
- layouts/_default/index.llms.txt → layouts/home.llms.txt
- layouts/tag/ → layouts/tags/ (match /tags/ URL path)
2026-02-19 16:09:15 +01:00

20 lines
561 B
HTML

{{- $colors := (dict
"amber" "bg-amber-500 dark:bg-amber-400"
"blue" "bg-blue-500 dark:bg-blue-400"
"gray" "bg-gray-500 dark:bg-gray-400"
"green" "bg-green-500 dark:bg-green-700"
"red" "bg-red-500 dark:bg-red-400"
"violet" "bg-violet-500 dark:bg-violet-400"
)
-}}
{{- if not (isset $colors .color) -}}
{{- errorf "[badge] wrong color name: '%s' - supported values: amber, blue, gray, green, red, violet" .color -}}h
{{- end -}}
<span
class="not-prose {{ index $colors .color }} rounded-sm px-1 text-xs text-white"
>{{ .content }}
</span>