Last week, I added markdown support to a little blog engine I wrote for a django tutorial. And well, I accomplished it in minutes! I like markdown because is really easy to write and generates amazing html. It is presented here and the syntax is explained neatly in Stack Overflow, and they use it, too.
My approach was really simple: I wanted to write the posts in markdown with a preview (like in the question edition in Stack Overflow), store the posts in markdown and display them in html.
So, the steps:
markdownfolder to your project root.
load markupat the beginning of your templates and use the
markdownfilter (like in
entry.body|markdownto show entries stored in markdown as html).
showdown.jsand copy the minified js to your static files folder. (you can get it from the project homepage)
id_bodyand want to show the preview. Well, add a
div-let's call it
And that's it, you have markdown in your app! Don't make humans edit raw html ever again!
-More info can be found here