From 3184aed8b5f065557c3dccb6fe9dcbf3afdf42cf Mon Sep 17 00:00:00 2001 From: Marcin Mierzejewski Date: Sun, 3 May 2020 13:51:54 +0200 Subject: twitter: add twitter cards --- layouts/_default/baseof.html | 2 +- layouts/partials/twitter_cards.html | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/twitter_cards.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0fa4cc4..2c71714 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -23,7 +23,7 @@ {{ printf `` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }} {{ end }} {{- partial "opengraph.html" . -}} - {{ template "_internal/twitter_cards.html" . }} + {{- partial "twitter_cards.html" . -}} {{ template "_internal/google_analytics.html" . }} diff --git a/layouts/partials/twitter_cards.html b/layouts/partials/twitter_cards.html new file mode 100644 index 0000000..cac9672 --- /dev/null +++ b/layouts/partials/twitter_cards.html @@ -0,0 +1,19 @@ +{{- with .Params.image }} +{{ $image := $.Resources.GetMatch . }} +{{ with $image }} +{{ $thumb := .Resize "400x" }} + + +{{ end }} +{{ end }} + + + +{{ with .Site.Social.twitter -}} + +{{ end -}} +{{ range .Site.Authors }} +{{ with .twitter -}} + +{{ end -}} +{{ end -}} \ No newline at end of file -- cgit v1.2.3