diff --git a/tpl/tplimpl/template_embedded.go b/tpl/tplimpl/template_embedded.go index 4c7113ae3..14f9f138c 100644 --- a/tpl/tplimpl/template_embedded.go +++ b/tpl/tplimpl/template_embedded.go @@ -231,23 +231,22 @@ func (t *templateHandler) embedTemplates() { {{ with .Site.Social.facebook_admin }}{{ end }}`) - t.addInternalTemplate("", "twitter_cards.html", `{{ if .IsPage }} -{{ with .Params.images }} - - - -{{ else }} - -{{ end }} - - - + t.addInternalTemplate("", "twitter_cards.html", `{{- with $.Param "images" -}} + + +{{ else -}} + +{{- end -}} - -{{ with .Site.Social.twitter }}{{ end }} + +{{ with .Site.Social.twitter -}} + +{{ end -}} {{ range .Site.Authors }} - {{ with .twitter }}{{ end }} -{{ end }}{{ end }}`) +{{ with .twitter -}} + +{{ end -}} +{{ end -}}`) t.addInternalTemplate("", "google_news.html", `{{ if .IsPage }}{{ with .Params.news_keywords }}