From 440e4fa75368b0eb9e5ff226156a6fb6fea58aae Mon Sep 17 00:00:00 2001 From: Lucy Date: Tue, 21 Jul 2020 14:35:51 +0200 Subject: [PATCH] add default metadata file to pandoc and add custom template --- blog-refresh.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blog-refresh.sh b/blog-refresh.sh index 0109b91..c90e516 100755 --- a/blog-refresh.sh +++ b/blog-refresh.sh @@ -70,7 +70,9 @@ create_entry() { path="$9" outpath="$(basename "$path" .md).html" # convert new markdown posts to html - pandoc -s --css=/css/sakura-vader.css "$path" src/footer/footer.md -t html5 -f markdown -o "dist/$outpath" + pandoc -s --css=/css/sakura-vader.css --template=./pandoc-template-v2.2.1.html5 \ + -V og-url="https://$outpath" \ + src/meta/default.yaml "$path" src/footer/footer.md -t html5 -f markdown -o "dist/$outpath" # then add it to the index title=$(grep -h '' "dist/$outpath" | sed 's/<title>//g;s/<\/title>//g') created=$(grep -h '^date: ' "$path" | sed 's/date: //g')