3 ms·
Love pandoc, I use it for all sorts of stuff…here is my minimal static site generator: find . -name '*.md' -type f -exec sh -c ' for file do out="docs
by malkosta 2mo ago
Love pandoc, I use it for all sorts of stuff…here is my minimal static site generator:
find . -name '*.md' -type f -exec sh -c '
for file do
out="docs/${file#./}"
out="${out%.md}.html"
mkdir -p "$(dirname "$out")"
pandoc --quiet --template template.html "$file" -o "$out"
done
' sh {} +
- randusername 2mo agoI do this too, but I use cmake to switch the backend between pandoc and lowdown [0]. Lowdown is not a drop-in replacement for pandoc flavored markdown, but it's between 10-100X faster. It's very handy to switch when tinkering with template changes because I can convert ~ 1000 markdown files instantaneously on my mid 2010s desktop. [0]: https://kristaps.bsd.lv/lowdown/ https://kristaps.bsd.lv/lowdown/