Skip to content

great web hosting with Dreamhost


Get MTW by Email

Enter your Email


Powered by FeedBlitz


  • Syndicate RSS 2.0
  • Syndicate with Atom

Creative Commons License

Blog Directory - Add Link

NoSpec!

Feedburner!

Performancing

Blog Directory

get camino browser

GeoURL


Markdown – speed up your markup

Markdown is a somewhat geeky text to html markup language developed by John Gruber. Actually Markdown is also a Perl script that uses regular expressions to convert text marked up with Markdown to html. I’m writing this piece in TextWrangler. When I’ve spell checked it, I’ll go the the #! menu and select Markdown.pl from the Unix Filters sub-menu. A second later the article will be formatted in HTML, ready to paste into Ecto, a desktop blogging client, for posting.

Now Ecto has built in Rich Text editing. WordPress on which this blog is running has a built in WYSIWYG editing. I’m covered twice for text formatting. Why should I bother pre-formatting my text with Markdown.

Now I would like to say that I prefer the clean markup that Markdown produces, which is much less verbose than that produced by either of the other options. And that is true as far as it goes. I try to be picky about clean code and absolutely standards compliant web pages. I’m not fanatic about it though. Honestly, mostly there is good enough for me. My templates validate and if the text thrown in by a WYSISWYG editor is a little funky, I’m not going to lose any sleep. Anyway, that’s reason number one.

What’s more important to me is that Markdown is a much faster faster way to write. By knowing a handful of Markdown tags I can format my text totally from the keyboard. Actually, the most common tags like those for paragraph and lists work automatically with line breaks or manual bulleting or numbering.

Things like headings are a simple matter of throwing in a pound sign or coming back and underlining the text with an equals sign. Precede a block of text with a greater than sign and you have a blockquote, and so on. This isn’t a tutorial. There is thorough documentation at the website.

As a Perl script, Markdown can be run from the menu of either BBEdit or it’s free little brother, TextWrangler. It might be possible to run it in other editors that execute shell scripts. I haven’t checked.

It is also possible to run either Markdown or Textile as an OS X service. That would allow you to write in TextEdit or another OS X Services aware application.

Markdown plugins are also available for major blogging systems like WordPress and Movable Type and content management systems like Mambo and many others. For me it’s just faster to type the text in TextWrangler, convert it and send it to Ecto (Services again) to post.

If you want to try it out, Gruber has provided a web dingus that will run the script and spit out the coded text.

Markdown started out as a Perl script to implement Textile, a Humane Text Generator, which is the brain child of Dean Allen. And Markdown will accept Textile syntax. However, Markdown has added some formatting conventions that Textile doesn’t recognize. Some people love Textile. I learned Markdown first and developed some non-Textile standard habits. Textile is also available as a plugin for most blogging and Open Source CMS’s.

Markdown will also work in conjunction with SmartyPants, which turns plain text punctuation into “typographically correct” text with “curly quotes” elipses and more. It too works in BBEdit or TextWrangler or as a plug-in to many blogging systems. It is nice but I’m boring enough to not care much.

If you feel like mixing HTML in with your Markdown, no problem. Markdown is smart enough to honor your code. Mostly. Always double check.


Possibly related:

5 Comments Add your own

  • 1. michael  |  March 14th, 2006 at 8:22 am

    I feel pretty slow. I’ve been writing in TextWrangler then using Services to transfer Markdown formated text to Ecto. With HumaneText.service, I can use Markdown directly in Ecto. Duh.

  • 2. michael  |  March 17th, 2006 at 7:26 am

    For more on Markdown see the Markdown Wiki

  • 3. Gone Markdown Crazy &laqu&hellip  |  September 8th, 2010 at 11:23 am

    [...] support Markdown natively. I added Markdown and SmartyPants as Unix Filter to TextWrangler using these instructions. I also added Markdown and SmartyPants as Mac OS X system Services using Automator, so I can use [...]

  • 4. click through the next ar&hellip  |  December 18th, 2012 at 5:14 pm

    click through the next article…

    Mac Web Design » MacTheWeb » Markdown – speed up your markup…

  • 5. Learn More&hellip  |  February 15th, 2013 at 2:09 am

    Learn More…

    Mac Web Design » MacTheWeb » Markdown – speed up your markup…

Leave a Comment

You must be logged in to post a comment.

Trackback this post  |  Subscribe to the comments via RSS Feed