From: Joann Mõndresku Date: Sat, 24 Jul 2021 09:12:15 +0000 (+0300) Subject: Quick and dirty OpenGraph image support X-Git-Url: https://git.based.quest/index.xml?a=commitdiff_plain;h=78738995639e494d5cf4617e4cef8aae8bcbbfcf;p=web-old.git Quick and dirty OpenGraph image support --- diff --git a/articles/pinetime-a-promising-open-smartwatch.md b/articles/pinetime-a-promising-open-smartwatch.md index 02b4093..58abf28 100644 --- a/articles/pinetime-a-promising-open-smartwatch.md +++ b/articles/pinetime-a-promising-open-smartwatch.md @@ -49,3 +49,4 @@ Thanks for reading ;tags:pine64 smartwatch opensource review ;description:PineTime is a open-source smartwtch built by Pine64 and the community on the budget. Does it hold up to Cernodile's standards - is he satisifed, is it any good or a fail? Find out in this blog post! +;og_image: diff --git a/blogit b/blogit index 4f590f4..cfc7017 100755 --- a/blogit +++ b/blogit @@ -141,6 +141,8 @@ blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header ar export TAGS; \ DESCRIPTION="$(shell grep -i '^; *description:' "$<" | cut -d: -f2-)"; \ export DESCRIPTION; \ + OG_IMAGE="$(shell grep -i '^; *og_image:' "$<" | cut -d: -f2-)"; \ + export OG_IMAGE; \ envsubst < templates/header.html > $@; \ envsubst < templates/article_header.html >> $@; \ sed -e 1d \ diff --git a/templates/article_header.html b/templates/article_header.html index 8f2c196..4218d07 100644 --- a/templates/article_header.html +++ b/templates/article_header.html @@ -1,5 +1,6 @@ +$OG_IMAGE <-- Back

$TITLE