add default metadata file to pandoc and add custom template

This commit is contained in:
Lucy 2020-07-21 14:35:51 +02:00
parent 3e7021845c
commit 440e4fa753

View File

@ -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 '<title>' "dist/$outpath" | sed 's/<title>//g;s/<\/title>//g')
created=$(grep -h '^date: ' "$path" | sed 's/date: //g')