Marked Down
March 20th, 2004 • Geeking Out / Site
Recently John Gruber posted an entry entitled Dive Into Markdown, which explains the reasons for not writing blog entries in (X)HTML. His main point is that while it isn’t hard to write in HTML, it’s also not the easiest way to compose prose. That totally resonates with me, so I went ahead and grabbed a copy of the Markdown Perl script and integrated it (along with SmartyPants) into my site’s code.
Now instead of having to remember to properly open and close all my paragraphs and escape every &, I can just write. It’s incredibly refreshing, even moreso than I thought it would be. If you’re using MT, Markdown is a plugin. If you’re using a custom solution or something PHP based, here’s a function you can use to throw things through Markdown before posting:
Note: You don’t have to do this anymore! Get PHP Markdown instead.
Markdown’s syntax is fairly intuitive and easy to learn. You can use HTML inside a Markdown document without having to escape it or tell Markdown that you’re using HTML. I’m impressed, and totally liking it.
To see Markdown in action, check out the demo. Go forth and markdown!
♫ Milk Inc. - The Sun Always Shines On TV
matthew
March 21st, 2004 at 12:35 am
that code is HOT
dave
March 22nd, 2004 at 10:55 am
Very nice. For those people using MT, I've found that Zempt saves a lot of time.
John Gruber
March 25th, 2004 at 12:13 pm
Hi there. Thanks for the nice write-up.
One quick suggestion, however. The command-line –htmltags option is something you probably don't need. What it does is use HTML 4 style tags instead of XHTML. Since your site is using XHTML, you'd be better off not using this option. (XHTML tags are Markdown's default.)
adam
March 25th, 2004 at 1:02 pm
ah, good catch. i guess i didn't read the documentation closely enough. :-[ it's fixed in the example and my site code now.
thanks for markdown, it's great. :-)
dave
March 29th, 2004 at 2:40 pm
So what is up with the lack of updates? It's been over a week now! I'm going through withdrawal. ;-)