From ad5c8f0bb528e6d0da0a20f99997ce971544f4b8 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sun, 20 Oct 2019 21:26:47 +0200 Subject: More refining on twitter cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- _plugins/twitter.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to '_plugins/twitter.rb') diff --git a/_plugins/twitter.rb b/_plugins/twitter.rb index 2c9cbfd..e65831b 100644 --- a/_plugins/twitter.rb +++ b/_plugins/twitter.rb @@ -25,6 +25,8 @@ module Jekyll img = normalize(context["raw_title"]) + ".png" path = image_exists?(img) ? "/images/posts/#{img}" : DEFAULT_PATH render_meta("og:image", "http://jo.mssola.com#{path}") + + render_meta("og:image:width", 630) + + render_meta("og:image:height", 315) + render_meta("twitter:image", "http://jo.mssola.com#{path}", name: true) end -- cgit v1.2.3