From 78738995639e494d5cf4617e4cef8aae8bcbbfcf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joann=20M=C3=B5ndresku?= Date: Sat, 24 Jul 2021 12:12:15 +0300 Subject: [PATCH] Quick and dirty OpenGraph image support --- articles/pinetime-a-promising-open-smartwatch.md | 1 + blogit | 2 ++ templates/article_header.html | 1 + 3 files changed, 4 insertions(+) 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

-- 2.25.1