From abe3b6761139a97ce535486af2f6918f2a8c0051 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Wed, 25 May 2022 00:01:42 +0200 Subject: Add ability to create twitter cards --- layouts/partials/templates/twitter_cards.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 layouts/partials/templates/twitter_cards.html (limited to 'layouts/partials/templates/twitter_cards.html') diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html new file mode 100644 index 0000000..970c137 --- /dev/null +++ b/layouts/partials/templates/twitter_cards.html @@ -0,0 +1,19 @@ + + + + + {{- /* Twitter username for the website used in the card footer */}} + {{- with site.Social.twitter }} + + {{- end }} + + {{- $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png" ) -}} + {{- $image := .Resources.GetMatch .Params.featured_image -}} + + {{- if and .IsPage $image }} + + + {{- else }} + + + {{- end -}} -- cgit v1.2.3