1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-09-30 11:54:18 +02:00
hugo-theme-bootstrap4-blog/layouts/partials/twitter_cards.html
Alan Orth 40864e252e
layouts/partials/twitter_cards.html: Remove twitter:domain
This apparently used to exist but is no longer mentioned on the doc
page for Twitter Cards markup.

See: https://dev.twitter.com/cards/markup
2017-01-23 14:52:27 +02:00

17 lines
801 B
HTML

{{ if .IsPage }}
{{ with .Params.images }}
<!-- Twitter summary card with large image must be at least 280x150px -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image:src" content="{{ index . 0 | absURL }}"/>
{{ else }}
<meta name="twitter:card" content="summary"/>
{{ end }}
<!-- Twitter Card data -->
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
{{ with .Site.Social.twitter }}<meta name="twitter:site" content="@{{ . }}"/>{{ end }}
{{ range .Site.Authors }}
{{ with .twitter }}<meta name="twitter:creator" content="@{{ . }}"/>{{ end }}
{{ end }}{{ end }}