summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorakgnah2020-05-02 12:41:55 +0800
committerakgnah2020-05-02 12:41:55 +0800
commitb4c1d25f42db1b16e6e9ddfa80b6bc3f4d327eb7 (patch)
treea748b62a2333e77393fbce6796b5feb834d9e15e /layouts
parentbfdf61a2d99bf25c10a628ea89aee801102a3f9c (diff)
downloadhugo-theme-fuji-b4c1d25f42db1b16e6e9ddfa80b6bc3f4d327eb7.tar.gz
hugo-theme-fuji-b4c1d25f42db1b16e6e9ddfa80b6bc3f4d327eb7.tar.bz2
hugo-theme-fuji-b4c1d25f42db1b16e6e9ddfa80b6bc3f4d327eb7.zip
Fix title when subtitle is empty
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/head.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 9f4dda7..861e6bc 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -8,8 +8,10 @@
{{ partial "favicon.html" . }}
-{{ if .IsHome }}
+{{ if and (.IsHome) (.Site.Params.subTitle) }}
<title>{{ .Site.Title }} - {{ .Site.Params.subTitle }}</title>
+{{ else if .IsHome }}
+<title>{{ .Site.Title }}</title>
{{ else }}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{ end }}