A post I wrote last fall about using Make to convert all the Markdown files in a directory to PDFs continues to draw lots of traffic, so it must be a solution that people find useful. I’ve since started using Rake instead of Make. You can find any number of comparisons between Make and and Rake. I use Rake because I like having the power of Ruby, but Make handles dependencies much better than Rake.
Here’s is a generic
Rakefile to make PDFs and DOCXs of every Markdown file in a directory.
If you prefer that your filenames be
document.md.pdf instead of
document.pdf, then you have to do something ugly and replace the rules above with these rules: