forked from kageru/mdb
add default metadata file to pandoc and add custom template
This commit is contained in:
parent
3e7021845c
commit
440e4fa753
|
@ -70,7 +70,9 @@ create_entry() {
|
||||||
path="$9"
|
path="$9"
|
||||||
outpath="$(basename "$path" .md).html"
|
outpath="$(basename "$path" .md).html"
|
||||||
# convert new markdown posts to 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
|
# then add it to the index
|
||||||
title=$(grep -h '<title>' "dist/$outpath" | sed 's/<title>//g;s/<\/title>//g')
|
title=$(grep -h '<title>' "dist/$outpath" | sed 's/<title>//g;s/<\/title>//g')
|
||||||
created=$(grep -h '^date: ' "$path" | sed 's/date: //g')
|
created=$(grep -h '^date: ' "$path" | sed 's/date: //g')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user