Generate HTML from a Folder of Markdown Files:
I have some Markdown files that I’m editing and I wanted to generate a folder of HTML files. I looked around on my machine and was surprised I didn’t have anything at hand for that already.
So I wrote a script. I’m a Ruby novice, and it’s quite likely that my Ruby is weird in a dozen different ways. But the script still might be useful to you. (The script requires the RDiscount gem.)
[one of my faves is to turn those if/then statements into guard clauses:
so this: if extension == ‘.markdown’ then return true end
return true if extension == ‘.markdown’
Just a personal fave, nothing more. I find them easy to read.]