Quick and dirty OpenGraph image support
[web-old.git] / blogit
diff --git a/blogit b/blogit
index 5be242954ea9b3e0d0bab525081ae84cb4591b9f..cfc7017ed149c84e21740ac5346b1f1e3607a196 100755 (executable)
--- a/blogit
+++ b/blogit
@@ -139,6 +139,10 @@ blog/%.html: $(BLOG_SRC)/%.md $(addprefix templates/,$(addsuffix .html,header ar
        export DATE_EDITED; \
        TAGS="$(shell grep -i '^; *tags:' "$<" | cut -d: -f2- | paste -sd ',')"; \
        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 \