From a709b3b6a254ad62c8c6a406faf03197c1c9fe7f Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 23 Jan 2017 14:51:44 +0200 Subject: [PATCH] Import Hugo's Twitter cards partial from tpl/template_embedded.go I want to see if I can improve the metadata here. --- layouts/partials/head-meta.html | 2 +- layouts/partials/twitter_cards.html | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/twitter_cards.html diff --git a/layouts/partials/head-meta.html b/layouts/partials/head-meta.html index 7c81769..3d130ab 100644 --- a/layouts/partials/head-meta.html +++ b/layouts/partials/head-meta.html @@ -2,7 +2,7 @@ {{ partial "opengraph.html" . }} -{{ template "_internal/twitter_cards.html" . }} +{{ partial "twitter_cards.html" . }} {{- with .Site.Params.google_verify_meta -}} diff --git a/layouts/partials/twitter_cards.html b/layouts/partials/twitter_cards.html new file mode 100644 index 0000000..f658a4a --- /dev/null +++ b/layouts/partials/twitter_cards.html @@ -0,0 +1,17 @@ +{{ if .IsPage }} +{{ with .Params.images }} + + + +{{ else }} + +{{ end }} + + + + +{{ with .Site.Social.twitter }}{{ end }} +{{ with .Site.Social.twitter_domain }}{{ end }} +{{ range .Site.Authors }} + {{ with .twitter }}{{ end }} +{{ end }}{{ end }}