Simplified docs

This commit is contained in:
Collin R
2020-02-08 00:42:48 -08:00
parent dc51398492
commit de01671e98
5 changed files with 91 additions and 74 deletions

View File

@@ -1,8 +1,15 @@
#!/usr/bin/env bash
docfiles=( $(ls *.md) )
# If files specified, only make them; otherwise, make all
if [[ $# -gt 0 ]]; then
docfiles=( "$@" )
else
docfiles=( $(ls *.md) )
fi
for fname in "${docfiles[@]}"; do
outname="${fname/%md/html}"
outname="_${fname/%md/html}"
echo $fname "->" $outname
pandoc -s -f gfm -t html $fname -o $outname --metadata pagetitle="$outname"
open $outname
done