From 27f2030260eb38675da6c959e1415d06ae8b9bf0 Mon Sep 17 00:00:00 2001 From: Gigi <109058+dergigi@users.noreply.github.com> Date: Wed, 28 Aug 2024 01:02:38 +0100 Subject: [PATCH] fix(books): properly set og:image for books (#492) --- _includes/head.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index a6c1250d..45de5534 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -13,6 +13,18 @@ {{ site.title | escape }} {% endif %} {% endcapture %} + +{% if page.path contains 'books' %} + + {% capture slugTitle %}{{ page.title | slugify }}{% endcapture %} + {% capture folderPath %}/assets/images/bitcoin/books{% endcapture %} + {% capture cardImageUrl %}{{ folderPath }}/jpg/{{ slugTitle }}.jpg{% endcapture %} + + + {% capture cardAuthors %}{{ page.authors | join: " and " }}{% endcapture %} + {% capture cardDescription %}Book by {{ cardAuthors }}{% endcapture %} +{% endif %} + {{ fullTitle }} @@ -25,19 +37,7 @@ - - - -{% if page.path contains 'books' %} - - {% capture slugTitle %}{{ page.title | slugify }}{% endcapture %} - {% capture folderPath %}/assets/images/bitcoin/books{% endcapture %} - {% capture cardImageUrl %}{{ folderPath }}/jpg/{{ slugTitle }}.jpg{% endcapture %} - - - {% capture cardAuthors %}{{ page.authors | join: " and " }}{% endcapture %} - {% capture cardDescription %}Book by {{ cardAuthors }}{% endcapture %} -{% endif %} +