Hugo theme skeleton

This commit is contained in:
DarkCat09 2023-11-04 11:44:43 +04:00
parent 7c81a5a0dd
commit 4e77e64ab2
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3
19 changed files with 249 additions and 0 deletions

View file

@ -0,0 +1,23 @@
{{- /*
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 }}
<div>
<div>{{ $label }}:</div>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}