From f5e4d646132a9a0fd8c929c190579540672314b3 Mon Sep 17 00:00:00 2001 From: Christian Mahnke Date: Sun, 1 Sep 2024 08:21:18 +0200 Subject: [PATCH] Improve title --- layouts/_default/single.html | 6 +++++- layouts/partials/html/head/theme.html | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4c93f1b3ef..4e1066acc4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,5 +1,9 @@ {{ define "title" -}} - {{ .Title }} · {{ .Site.Title }} + {{- if ne .Title "" -}} + {{- .Title }} · {{ .Site.Title -}} + {{- else -}} + {{- .Site.Title -}} + {{- end -}} {{- end }} {{ define "content" }} {{- partial "header.html" . -}} diff --git a/layouts/partials/html/head/theme.html b/layouts/partials/html/head/theme.html index 225e0726b4..f51fad6e28 100644 --- a/layouts/partials/html/head/theme.html +++ b/layouts/partials/html/head/theme.html @@ -1,11 +1,11 @@ {{- $color := "" -}} {{- if .Site.Params.pagetheme -}} - {{- $color = "" -}} + {{- $color = .Site.Params.pagetheme -}} {{- end -}} {{- if .Params.pagetheme -}} - {{- $color = "" -}} + {{- $color = .Params.pagetheme -}} {{- end -}} {{- if ne $color "" -}}