Ridecast logo
February 5, 2007

Text markup using Textile

Filed under: Howtos / tips / tricks — mtbguru @ 10:11 pm

Trip descriptions and trip comments on MTBGuru are entered and edited using simple text boxes, into which you can type your lines just like you’d do in any regular text editor.

However, there’s much more you can do with it: we support Textile, a simple text markup language, or, as its creators describe it, a ‘Humane Web Text Generator’. It eliminates the need to know HTML or juggle around with HTML tags anytime you want to do simple things like insert a hyperlink. Instead, you have a very simple and elegant yet versatile and powerful way to achieve this, as well as perform a host of other text structuring and formatting tasks. It hardly takes effort to memorize the simple syntax, and this brief Textile reference nicely summarizes everything.

For instance, to create a hyperlink, put the word(s) that make up the link anchor in between double quotation marks, followed by a colon and the URL you want to make it point to (without spaces in between):

This is "a link":http://www.thispointstomywebsite.com to my web site.

This is parsed when you’re done editing and turned into a regular hyperlink in your description or comment box:

This is a link to my web site.

It’s also very easy to format your text. For instance, use h1. (or h2., h3. etc) as a prefix to create headers. Lists are generated by using the star (*) or pound (#) symbol as prefix. And so on. Check the Textile reference for many more examples. It’s vastly more convenient than using HTML to mark up or format your text (no need to worry about properly closing your tags etc).

And the nice thing is: Textile also understands regular HTML code – so you can mix up simple text, Textile syntax and HTML code in the same document if you wanted to.

Leave a Reply