Markdown to WordPress Format
WordPress understand Markdown format now, so this post is obsolete.
When I discovered MarkDown I was in love, it was very nice to discover an easy, clean, well-thought-out markup language. I wanted a way to be able take my detailed notes, have them easy to read, and then to be able post them here on the blog that would be in a nice WordPress format. Yesterday, I wrote about discovering
pandoc which enables a person to write in markdown and have it converted to HTML. To be able to use the HTML code created by
pandoc in WordPress it needed to be slightly edited and cleaned up. Therefore,… I created a bash script for it.
It works pretty good. Basically it removes tags for paragraphs (
<p>), cleans up code blocks, improves formating, as well as doing a few other things. I haven’t gone through all permutations that pandoc conversion can do so a few thing swill be left out, but otherwise it should work for most things. If anything needs to be added please let me know.