[LAYOUT] Clean twitter:card

This commit is contained in:
Gregory Trolliet 2020-04-28 21:49:52 +02:00
parent 614456807c
commit f3b542693d

View file

@ -1,15 +1,8 @@
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@{{ .Site.Params.twitterUser }}"/>
<meta name="twitter:creator" content="@{{ .Site.Params.twitterUser }}"/>
{{ with .Site.Params.twitterUser }}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end }}
{{/*if .Params.images }}
{{ $baseUrl := .Permalink }}
{{ range first 1 .Params.images }}
<meta name="twitter:image" content="{{ $baseUrl }}{{ . }}"/>
{{ end }}
{{ else }}
<meta name="twitter:image" content="{{ .Site.BaseURL }}images/{{ .Site.Params.avatar }}"/>
{{ end */}}
<meta name="twitter:title" content="{{ .Title }}"/>
{{ if .Description }}
<meta name="twitter:description" content="{{ .Description }}"/>