aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/head-title.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/partials/head-title.html')
-rw-r--r--themes/default/layouts/partials/head-title.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/head-title.html b/themes/default/layouts/partials/head-title.html
new file mode 100644
index 0000000..fff4530
--- /dev/null
+++ b/themes/default/layouts/partials/head-title.html
@@ -0,0 +1,20 @@
+{{- $author := index .Site.Data.authors .Section -}}
+
+{{- if not (eq .Title $.Site.Title) -}}
+ {{- with $title := or .Title .Summary -}}
+ {{ $title }} —
+ {{ end }}
+{{- end -}}
+
+{{- with $title := $.Site.Title -}}
+ {{- if (in (slice
+ "home"
+ "taxonomy"
+ "term"
+ ) $.Page.Kind)
+ -}}
+ {{ $title }}
+ {{- else -}}
+ {{ $author.title }}
+ {{- end -}}
+{{- end -}}