Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pravin/hugo-theme-prav.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Rosenshein <leon@rosenshein.org>2022-03-20 07:25:39 +0300
committerLeon Rosenshein <leon@rosenshein.org>2022-03-20 07:25:39 +0300
commit1477f5982b5460b370fe9f62efc55589b7a84614 (patch)
tree8759ab2404d4a75d4f1b995136d493f927abee59
parentb74ac16d35195f8b493de8a7786c9b599dba5751 (diff)
Better <title> formatting for search engines
-rw-r--r--layouts/partials/header.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 5ad171e..0b168e0 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -2,16 +2,16 @@
<meta charset="utf-8">
<meta name="theme-color" content="#000" />
<title>
- {{ if .IsHome }}
- {{ if .Site.Title }}
- {{ .Site.Title }}
- {{ else }}
- {{ .Site.Params.Title }}
- {{ end }}
- &middot; {{ .Site.Params.Tagline }}
- {{ else }}
- {{ .Title }} &middot; {{ .Site.Title }} {{ .Site.Params.Title }}
- {{ end }}
+ {{- if .IsHome -}}
+ {{ if .Site.Title -}}
+ {{ .Site.Title -}}
+ {{ else -}}
+ {{ .Site.Params.Title -}}
+ {{ end -}}
+ &middot; {{ .Site.Params.Tagline -}}
+ {{ else -}}
+ {{ .Title }} &middot; {{ .Site.Title }} {{ .Site.Params.Title -}}
+ {{- end -}}
</title>
<!-- Stylesheets -->