Skip to content

Commit

Permalink
#55 add pandoc build script
Browse files Browse the repository at this point in the history
  • Loading branch information
tbela99 committed Sep 23, 2019
1 parent c31c46f commit 301fb91
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pandoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh -x
## see https://devilgate.org/blog/2012/07/02/tip-using-pandoc-to-create-truly-standalone-html-files/
# pandoc -f markdown -t html Docs/src/*.md > Docs/dist/
pandoc=$(which pandoc)
php=$(which php)
tee=$(which tee)
for file in $(ls Docs/src/*.md)
do
base=$(basename $file | sed s/\.md$/\.html/)
pandoc -s --metadata-file Docs/src/metadata.yml --template Docs/template/template.html --toc --toc-depth=4 -f markdown -t html5 $file -c "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" | php ./Docs/src/filter.php | tee "Docs/dist/$base"
done

0 comments on commit 301fb91

Please sign in to comment.