aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-02-22 21:47:52 -0500
committertdro <tdro@noreply.example.com>2023-02-22 21:47:52 -0500
commit9f8738249627488e790dc251ac18ef2315c3335a (patch)
tree3333247cd43ca22a78e38a2bb5a8ba1b6dcad7e7
parent655df220f4c53b41df15f3ea7076af3d94a9c661 (diff)
downloadcanory-9f8738249627488e790dc251ac18ef2315c3335a.tar.gz
canory-9f8738249627488e790dc251ac18ef2315c3335a.tar.bz2
canory-9f8738249627488e790dc251ac18ef2315c3335a.zip
themes/default/layouts/partials/base-title: Use page kind
To ensure consistent title
-rw-r--r--themes/default/layouts/partials/base-title.html17
1 files changed, 11 insertions, 6 deletions
diff --git a/themes/default/layouts/partials/base-title.html b/themes/default/layouts/partials/base-title.html
index 4d5bd92..b34355d 100644
--- a/themes/default/layouts/partials/base-title.html
+++ b/themes/default/layouts/partials/base-title.html
@@ -1,14 +1,19 @@
-{{ $author := index .Site.Data ((or .Params.author .Site.Author.default.title) | default "default") }}
+{{- $author := index .Site.Data ((or .Params.author .Site.Author.default.title) | default "default") -}}
{{- if not (eq .Title $.Site.Title) -}}
- {{- with or .Title .Summary -}}
- {{ . }} &mdash;
+ {{- with $title := or .Title .Summary -}}
+ {{ $title }} &mdash;
{{ end }}
{{- end -}}
-{{- with $.Site.Title -}}
- {{ if $.IsHome -}}
- {{ . }}
+{{- with $title := $.Site.Title -}}
+ {{- if (in (slice
+ "home"
+ "taxonomy"
+ "term"
+ ) $.Page.Kind)
+ -}}
+ {{ $title }}
{{- else -}}
{{ $author.title }}
{{- end -}}