diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-28 17:13:49 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-28 17:13:49 +0200 |
| commit | aa6f524fa6cb5b4cee0b64d35138ac0318bf7fd8 (patch) | |
| tree | 497a11cb14b34763d1e8331999abb4f35d8a4548 /layouts/partials | |
| parent | 7a76469d3a001aa63289f9698ffc784a4c1926ed (diff) | |
| download | gohugo-theme-ed-aa6f524fa6cb5b4cee0b64d35138ac0318bf7fd8.tar.gz | |
Provide an ability to use `keywords` meta tag
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/head.html | 3 | ||||
| -rw-r--r-- | layouts/partials/keywords.html | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 24fd6f9..14cd475 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -7,6 +7,9 @@ <title>{{ block "title" . }}{{- partial "title.html" . -}}{{ end }}</title> <meta name="description" content="{{ (partial "description.html" . ) }}"> + {{ if or .Params.tags site.Params.seoKeywords }} + <meta name="keywords" content="{{ (partial "keywords.html" . ) }}"> + {{ end }} <meta name="author" content="{{ (partial "author.html" . ) }}"> {{ hugo.Generator }} diff --git a/layouts/partials/keywords.html b/layouts/partials/keywords.html new file mode 100644 index 0000000..a25be75 --- /dev/null +++ b/layouts/partials/keywords.html @@ -0,0 +1,5 @@ +{{- if .Params.tags -}} + {{- delimit .Params.tags ", " -}} +{{- else -}}{{ site.Params.keywords }} + {{- delimit site.Params.seoKeywords ", " -}} +{{- end -}} |
