aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_layouts/default.html18
-rw-r--r--_plugins/twitter.rb2
-rw-r--r--images/default.pngbin9980 -> 1627 bytes
3 files changed, 11 insertions, 9 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index 9ae7643..bf03d37 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -27,16 +27,9 @@
<title>{{ title }}</title>
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
{% capture description %}{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}{% endcapture %}
- <meta name="description" content="{{ description }}">
-
- {% comment %}<!-- Twitter stuff -->{% endcomment %}
- <meta name="twitter:card" content="summary_large_image" />
- <meta name="twitter:site" content="@miquelssola" />
- <meta name="twitter:creator" content="@miquelssola" />
- <meta name="twitter:description" content="{{ description }}" />
- <meta name="twitter:title" content="{{ title }}" />
+ <meta name="description" content="{{ description }}" />
{% comment %}<!-- OpenGraph protocol -->{% endcomment %}
{% if site.lang == "ca" %}
@@ -51,6 +44,13 @@
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ description }}" />
<meta property="og:type" content="website" />
+
+ {% comment %}<!-- Twitter stuff -->{% endcomment %}
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:site" content="@miquelssola" />
+ <meta name="twitter:creator" content="@miquelssola" />
+ <meta name="twitter:description" content="{{ description }}" />
+ <meta name="twitter:title" content="{{ title }}" />
{% render_og_image %}
{% comment %}<!-- We have the same CSS file for all languages -->{% endcomment %}
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
diff --git a/images/default.png b/images/default.png
index 8a85866..bc21f1c 100644
--- a/images/default.png
+++ b/images/default.png
Binary files differ