mirror of
https://github.com/avinal/avinal.github.io.git
synced 2026-07-03 23:30:09 +05:30
91d3d5df19
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com> rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
23 lines
725 B
HTML
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="{{ .RelPermalink }}">#{{ .LinkTitle }}</a>
|
|
{{- end }}
|
|
</span>
|
|
{{- end }}
|
|
|