fix tags n terms

This commit is contained in:
teldra 2022-06-24 15:59:42 +02:00
parent b5cab0a9bb
commit 914dac712a
3 changed files with 15 additions and 23 deletions

View File

@ -8,8 +8,8 @@
{{ define "content" }}
<div>
{{ range .Data.Pages }}
{{ . }}
{{ end }}
{{ range $.Site.Taxonomies.tags.ByCount }}
<a href="{{ (printf "/tags/%s" .Name) | relLangURL }}"> {{ .Name }} <small>({{ .Count }})</small></a>
{{ end }}
</div>
{{ end }}

View File

@ -0,0 +1,12 @@
{{ define "banner" }}
{{ $image := "" }}
{{ if .Resources.GetMatch "banner*" }}
{{ $image = .Resources.GetMatch "banner*" }}
{{ end }}
{{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }}
{{ end }}
{{ define "content" }}
{{ $pages := .Data.Pages }}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}

View File

@ -1,20 +0,0 @@
{{ define "banner" }}
{{ $image := "" }}
{{ if .Resources.GetMatch "banner*" }}
{{ $image = .Resources.GetMatch "banner*" }}
{{ end }}
{{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }}
{{ end }}
{{ define "content" }}
{{ if eq .Kind "taxonomy" }}
<div>
{{ range .Data.Pages }}
<a href="{{ .Page.Permalink }}" class="underline" style="margin-right: 1rem;">{{ .Page.Title }} </a>
{{ end }}
</div>
{{ else }}
{{- $pages := .Data.Pages -}}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}
{{ end }}