Merge pull request #219 from nisrulz/fix-build-when-keywords-tags-not-set

Fix issue with tags/keywords not set
This commit is contained in:
zzossig 2020-03-04 09:15:56 +09:00 committed by GitHub
commit 5650f3705d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -2,10 +2,11 @@
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" title="{{ .Name }}" href="{{ .Permalink | safeURL }}">
{{ end }}
<meta name="description" content="{{ $.Param "description" }}" />
{{ if isset .Params "keywords" }}
<meta name="keywords" content="{{ delimit .Keywords "," }}">
{{ else if isset .Params "tags" }}
<meta name="keywords" content="{{ delimit .Params.tags "," }}">
{{ with $.Params.keywords }}
<meta name="keywords" content="{{ delimit $.Params.keywords "," }}">
{{ end }}
{{ with $.Params.tags }}
<meta name="keywords" content="{{ delimit $.Params.tags "," }}">
{{ end }}
<meta name="created" content="{{ .Date.Format "2006-01-02T15:04:05-0700" }}">
<meta name="modified" content="{{ .Lastmod.Format "2006-01-02T15:04:05-0700" }}">