use pandoc default files for metadata and applying templates as needed

This commit is contained in:
Tim Schubert 2021-08-18 23:49:49 +02:00
parent 39db7ded7d
commit 12fc6478e1
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
17 changed files with 50 additions and 30 deletions

View file

@ -1,3 +1,4 @@
#!/bin/sh
find . -iname "*.md" -type f -exec sh -c 'pandoc -s -f markdown -t html --template=src/template.html -o "${0%.md}.html" "${0}"' {} \;
find src -type d -exec sh -c 'srcpath="$(realpath ${0})"; outpath=$(realpath "build${0#src}"); echo "src=$srcpath; dst=$outpath"; mkdir -p "$outpath" && cd "$srcpath" && pandoc -d "${srcpath}/defaults.pandoc" -o "${outpath}/index.html" ' {} \;