Logo Devoh


After building the initial version of Snail Drop, which I'm hoping to write about here soon, I had thrown up a blog for it on Tumblr. This was quick and easy, but I still had more work to do in theming it out to match the Snail Drop site, and it felt like I was doubling up on a lot of maintenance work by having the blog separate of the main app. What I really wanted was a simple way to bolt a blog onto a Rails app. In an ideal world, I'd be able to just throw a Markdown file into a directory à la Jekyll.

Well, there's at least one other person in the world who thinks the way I do, because I found just that in Postmarkdown. I tweeted about it the other day, but I'm so happy with it, I wanted to write more about it here.

The installation generator creates the directory app/posts for you, and the Gem also provides a generator that can be used to create new posts. It then ties those static Markdown files into the Rails app through a flexible routing helper and a controller, model, and views that are hidden away within the engine. It even provides a feed and a means of adding the feed link to your application layout.

I'd love to give a rundown on how it all works here, but there's nothing I could say that isn't already covered well in the Postmarkdown readme. I will say that it's not only easy to install, but it also provides configuration flexibility in all the right places, including generators for overriding individual parts of the engine. More projects like this, please! And thanks to the folks at Ennova for raising the bar and releasing such a fabulous piece of code.

and tagged with gem and ruby