diff options
author | Piotr Orzechowski <piotr@orzechowski.tech> | 2021-10-25 16:41:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 16:41:00 +0300 |
commit | f3f2a88076da59b9b979dbb083d42301c98e6528 (patch) | |
tree | 8f3c8a61026a129ef1ec4fc16642769032d7ef5f | |
parent | 1cbf789bc3dd7d90a664a0c02b669bd7f1b1b2c4 (diff) |
Do not insert leading comma when local keywords are empty
-rw-r--r-- | layouts/partials/meta.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 51840b6..063c21c 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -3,7 +3,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="generator" content="Hugo {{ hugo.Version }} with theme Tranquilpeak 0.6.0-SNAPSHOT"> <meta name="author" content="{{ .Site.Author.name }}"> -<meta name="keywords" content="{{ with .Keywords }}{{ delimit . ", " }}{{ end }}{{ if .Site.Params.keywords }}, {{ delimit .Site.Params.keywords ", " }}{{ end }}"> +<meta name="keywords" content="{{ with .Keywords }}{{ delimit . ", " }}{{ end }}{{ if and .Keywords .Site.Params.keywords }}, {{ end }}{{ with .Site.Params.Keywords }}{{ delimit . ", "}}{{ end }}"> <meta name="description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}"> <!-- Meta Social --> |