Only use isset check for twitter:site param

See https://gohugo.io/functions/isset/ - consistent with all other param checks in file
This commit is contained in:
willstocks 2020-03-18 11:24:24 +00:00 committed by GitHub
parent 6f5e42002e
commit 5ede34df2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
{{ if (isset $.Site.Params.Twitter "site") or (eq $.Site.Params.Twitter.site "") }}
{{ if (isset $.Site.Params.Twitter "site") }}
<meta name="twitter:site" content="{{ $.Site.Params.Twitter.site }}" />
{{ end }}
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Params.Twitter.creator }}{{ else }}{{ .Params.Author }}{{ end }}" />