re: The World's Simplest "Static Site Generator" VIEW POST


Excellent post! Here's the oneliner bash loop ;)

for POST in *.md; do pandoc --to=html5 --output=$(basename ${}).html --standalone $POST; done

The $(basename ${}).html strips out the .md file extension, and also removes the directory path (helpful if your posts are stored in a folder). I found this stackoverflow question a helpful guide.

I'd also recommend eleventy as a no nonsense static site generator.


Not seen the basename trick before - very, very nice.

code of conduct - report abuse