artist-gallery-theme

Hugo theme made for websites with loads of images
Log | Files | Refs | README | LICENSE

twitter_cards.html (723B)


      1 {{- with .Params.image }}
      2 {{ $image := $.Resources.GetMatch . }}
      3 {{ with $image }}
      4 {{ $thumb := .Resize "400x" }}
      5 <meta name="twitter:card" content="summary_large_image"/>
      6 <meta name="twitter:image" content="{{ $thumb.Permalink }}">
      7 {{ end }}
      8 {{ end }}
      9 
     10 <meta name="twitter:title" content="{{ .Title }}"/>
     11 <meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
     12 {{ with .Site.Params.Social.twitter -}}
     13 <meta name="twitter:site" content="@{{ . }}"/>
     14 {{ end -}}
     15 {{ range .Site.Params.Authors }}
     16 {{ with .twitter -}}
     17 <meta name="twitter:creator" content="@{{ . }}"/>
     18 {{ end -}}
     19 {{ end -}}