{{ define "title" }} {{- $taxonomy := .Data.Plural -}} {{- $name := .Title -}} {{- if eq $taxonomy "category" -}}分类「{{ $name }}」 {{- else if eq $taxonomy "tag" -}}标签「{{ $name }}」 {{- else if eq $taxonomy "archive" -}}{{ $name }} 的存档 {{- else -}}{{ $name }} {{- end }} - {{ site.Params.siteTitle }} {{ end }} {{ define "main" }} {{- $taxonomy := .Data.Plural -}} {{- $name := .Title -}} {{- $slug := partial "slug.html" $name -}} {{- $base := "" -}} {{- $heading := $name -}} {{- if eq $taxonomy "category" -}} {{- $base = printf "/category/%s/" $slug -}} {{- else if eq $taxonomy "tag" -}} {{- $base = printf "/tag/%s/" $slug -}} {{- else if eq $taxonomy "archive" -}} {{- $base = printf "/archive/%s/" $name -}} {{- $heading = printf "%s 年" $name -}} {{- end -}} {{ partial "archive-title.html" (dict "title" $heading "total" (len .Pages)) }} {{- $paginator := .Paginate .Pages -}} {{- range $paginator.Pages -}} {{ partial "post-card.html" . }} {{- end -}} {{ partial "pagination.html" (dict "paginator" $paginator "base" $base) }} {{ end }}