1
0
mirror of https://github.com/avinal/avinal.github.io.git synced 2026-07-03 23:30:09 +05:30
Files
avinal.github.io/blog/layouts/partials/terms.html
T
avinal a196ac4391 added hugo website
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>

rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED
2024-03-30 12:44:19 +05:30

23 lines
725 B
HTML

{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonony.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<span class="flex flex-wrap py-6 space-x-2 border-t border-gray-500">
<!-- <a class="px-3 py-1 m-1 rounded-sm hover:underline bg-pink-400 text-gray-900 font-bold" href="/category/"></a> -->
{{- range . }}
<a class="px-3 py-1 m-1 rounded-sm bg-cyan-500 text-gray-900" href="{{ .RelativeLink }}">#{{ .LinkTitle }}</a>
{{- end }}
</span>
{{- end }}