Merge pull request #177 from arminfriedl/master
Only add twitter card if twitter defined
This commit is contained in:
commit
80fa802fa6
@ -33,11 +33,13 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Twitter Card -->
|
<!-- Twitter Card -->
|
||||||
|
{{ if (isset $.Site.Params "twitter") }}
|
||||||
<meta name="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary" />
|
||||||
{{ if (isset $.Site.Params.Twitter "site") }}
|
{{ if (isset $.Site.Params.Twitter "site") }}
|
||||||
<meta name="twitter:site" content="{{ $.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 if isset .Params "authortwitter" }}{{ .Params.authorTwitter }}{{ else }}{{ .Params.Author }}{{ end }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Params.Twitter.creator }}{{ else if isset .Params "authortwitter" }}{{ .Params.authorTwitter }}{{ else }}{{ .Params.Author }}{{ end }}" />
|
|
||||||
|
|
||||||
<!-- OG data -->
|
<!-- OG data -->
|
||||||
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
|
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
|
||||||
|
Loading…
Reference in New Issue
Block a user