Hugo-theme-stack/layouts/partials/data/title.html

16 lines
706 B
HTML
Raw Normal View History

2020-08-22 07:20:08 -04:00
{{- $title := .Title -}}
{{- $siteTitle := .Site.Title -}}
{{- $authorName := .Site.Author.name -}}
{{- if .IsHome -}}
{{ $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $pag := .Paginate ($filtered) }}
2020-08-22 07:20:08 -04:00
{{ if .Paginator.HasPrev }}{{ .Paginator }} - {{ end }}{{ $siteTitle }}
{{- else if eq .Kind "term" -}}
{{- $pag := .Paginate (where .Data.Pages "Type" "post") -}}
{{ title .Data.Singular }}: {{ $title }}{{ if .Paginator.HasPrev }} - {{ .Paginator }}{{ end }} - {{ $siteTitle }}
{{- else -}}
{{- $title -}}
{{- end -}}