From 420e822c8f52370bc063c8ab9df417a9a3d211bf Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sun, 20 Oct 2019 20:44:43 +0200 Subject: Added meta tags into the default layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also includes a small Jekyll plugin that automatically guesses the OG image to be used depending on the availability of a thumbnail image. Signed-off-by: Miquel Sabaté Solà --- _layouts/default.html | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to '_layouts') diff --git a/_layouts/default.html b/_layouts/default.html index 0adbf0d..2b452db 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -14,16 +14,42 @@ {% endcomment %} {% if page.title %} {% if page.title contains "titles." %} - {{ site.title }} - {% t page.title %} + {% capture title %}{{ site.title }} - {% t page.title %}{% endcapture %} + {% capture raw_title %}{% t page.title %}{% endcapture %} {% else %} - {{ site.title }} - {{ page.title }} + {% capture title %}{{ site.title }} - {{ page.title }}{% endcapture %} + {% capture raw_title %}{{ page.title }}{% endcapture %} {% endif %} {% else %} - {{ site.title }} + {% capture title %}{{ site.title }}{% endcapture %} + {% capture raw_title %}{% endcapture %} {% endif %} + {{ title }} + - + {% capture description %}{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}{% endcapture %} + + + {% comment %}{% endcomment %} + + + + + {% comment %}{% endcomment %} + {% if site.lang == "ca" %} + + + + {% else %} + + + + {% endif %} + + + + {% render_og_image %} {% comment %}{% endcomment %} -- cgit v1.2.3