first commit
This commit is contained in:
commit
384567df50
44 changed files with 501 additions and 0 deletions
22
themes/webbed-theme/layouts/_partials/terms.html
Normal file
22
themes/webbed-theme/layouts/_partials/terms.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{{- /*
|
||||
For a given taxonomy, renders a list of terms assigned to the page.
|
||||
|
||||
@context {page} page The current page.
|
||||
@context {string} taxonomy The taxonomy.
|
||||
|
||||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
*/}}
|
||||
|
||||
{{- $page := .page }}
|
||||
{{- $taxonomy := .taxonomy }}
|
||||
|
||||
{{- with $page.GetTerms $taxonomy }}
|
||||
{{- $label := (index . 0).Parent.LinkTitle }}
|
||||
<section>
|
||||
<p>{{ $label }}:
|
||||
{{- range . }}
|
||||
<a href="{{ .RelPermalink }}">#{{ .LinkTitle }}</a>
|
||||
{{- end }}
|
||||
</p>
|
||||
</section>
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue