Glider
"In het verleden behaalde resultaten bieden geen garanties voor de toekomst"
About this blog

These are the ramblings of Matthijs Kooijman, concerning the software he hacks on, hobbies he has and occasionally his personal life.

Most content on this site is licensed under the WTFPL, version 2 (details).

Questions? Praise? Blame? Feel free to contact me.

My old blog (pre-2006) is also still available.

Sun Mon Tue Wed Thu Fri Sat
     
14
       
Powered by Blosxom &Perl onion
(With plugins: config, extensionless, hide, tagging, Markdown, macros, breadcrumbs, calendar, directorybrowse, entries_index, feedback, flavourdir, include, interpolate_fancy, listplugins, menu, pagetype, preview, seemore, storynum, storytitle, writeback_recent, moreentries)
Valid XHTML 1.0 Strict & CSS
/ Blog / Blog
Rendering with Markdown

Until now I would type every post I made in pure XHTML. That is, paragraphs start with <p>, links were put into <a> tags, etc. Since that can become quite some work, and I wanted an easy way to insert links into my text (for example, I don't want to type http://www.debian.org everytime I want to include a link to Debian). Therefore, I searched for something that could do this kind of stuff for me.

The are a lot of Blosxom plugins that can automatically create paragrahps and generate other kinds of markup. Most of these plugins are based on some wiki syntax, but I actually liked none of these. Besides easily including links to fixed sites, I also wanted to be able to include links to posts within my blog, or images in some configurable directory.

I've decided to use Markdown for all this. Markdown is simple formatting language meant for blogs. It is designed in the style of email communication and should not just render pretty XHTML, but also look good in plaintext. Nobody will probably ever read my entries in plaintext besides me, but still, they look pretty now :-)

I had to modify markdown a little, though. Normally, all links used by markdown are in the same document (blog post in this case). That is, if I want to link to debian, I don't have to type the URL at the spot of the link (I can just say link to "Debian"), but I do have to type it somewhere in the post (to define that "Debian" actually means "http://www.debian.org").

I've hacked in support for reading a file that defines a number of links that can be used in any document without specifying the URL. This file contains the links that I expect to be using more than once.

This also allows me to easily insert sections and lots of links in a post, which I needed for my huge post about my new laptop. Also note that right now, links to blog entries, wikipedia or images do not work yet, since Markdown has no support for that. I will probably use the macrolinks plugin for that.

 
0 comments -:- permalink -:- 02:07
Copyright by Matthijs Kooijman