feat(page): add keywords front matter field for better SEO (#664)

* added keywords metadata tag for google SEO

* fix: avoid empty keywords meta tag

Co-authored-by: Jimmy Cai <github@jimmycai.com>
This commit is contained in:
gursi26 2022-10-22 06:13:24 -04:00 committed by GitHub
parent 70f431ea18
commit 9b464bd9fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@
{{- $description := partialCached "data/description" . .RelPermalink -}} {{- $description := partialCached "data/description" . .RelPermalink -}}
<meta name='description' content='{{ $description }}'> <meta name='description' content='{{ $description }}'>
{{ with .Params.Keywords }}<meta name="keywords" content="{{ delimit . ", " }}">{{ end }}
{{- $title := partialCached "data/title" . .RelPermalink -}} {{- $title := partialCached "data/title" . .RelPermalink -}}
<title>{{ $title }}</title> <title>{{ $title }}</title>