Zebra/themes/casper/layouts/partials/twitter_card.html

21 lines
799 B
HTML
Raw Normal View History

2020-08-05 17:22:00 +02:00
{{ if .IsPage }}
{{ with .Params.image }}
<!-- Twitter summary card with large image must be at least 280x150px -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ . | relURL }}"/>
{{ else }}
<meta name="twitter:card" content="summary"/>
{{ end }}
{{ else }}
<meta name="twitter:card" content="summary"/>
{{ with .Site.Params.cover }}
<meta name="twitter:image" content="{{ . | relURL }}"/>
{{ end }}
{{ end }}
<!-- Twitter Card data -->
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{if .IsPage}}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}"/>
<meta name="twitter:site" content="@{{ .Site.Params.twitterName }}"/>