diff options
author | akgnah | 2020-05-02 12:41:55 +0800 |
---|---|---|
committer | akgnah | 2020-05-02 12:41:55 +0800 |
commit | b4c1d25f42db1b16e6e9ddfa80b6bc3f4d327eb7 (patch) | |
tree | a748b62a2333e77393fbce6796b5feb834d9e15e /layouts | |
parent | bfdf61a2d99bf25c10a628ea89aee801102a3f9c (diff) | |
download | hugo-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.html | 4 |
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 }} |