pandoc-blog/bin/build-index.sh

11 lines
250 B
Bash
Raw Normal View History

#!/bin/zsh
cat templates/index-before.html > index.md
for file in $(ls -1 content/*.md | sort -r)
do
dest="${$(basename $file)/md/html}"
2022-03-04 00:00:50 +00:00
pandoc --template=templates/blog-list-item.template \
--variable=url:$dest $file \
>> index.md
done