Files
2010roadtripnyla/themes/hugo-theme-notrack/layouts/taxonomy/list.html
2022-09-04 13:08:42 +02:00

29 lines
909 B
HTML

{{ define "main" }}
<main>
{{- /* Hardcoded values for identifying whether we're looking at a tag or category */ -}}
{{ if or (eq .Data.Plural "categories") (eq .Data.Singular "category") }}
<h1>Category: {{ .Title }}</h1>
{{ else if or (eq .Data.Plural "tags") (eq .Data.Singular "tag") }}
<h1>Tag: {{ .Title }}</h1>
{{ end }}
{{- if .Pages -}}
{{- $pages := (where .Pages ".Draft" false) -}}
{{- with .Site.Params.list.paginate | default .Site.Params.paginate -}}
{{- $pages = $.Paginate $pages . -}}
{{- else -}}
{{- $pages = .Paginate $pages -}}
{{- end -}}
{{- range $pages.Pages -}}
<article class="archive-item">
{{ partial "blog-entry-summary.html" . }}
</article>
{{- end -}}
{{ partial "pagination.html" . }}
{{- end -}}
</main>
{{ end }}