I fell in love with Markdown.
From the source:
Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).
With Markdown I do not have to care about encodings and well formatted HTML that much. It’s all about concentrating on the content. When I was doing the new website CASE Apps I had to transfer the content from the old one. The old one was plain vanilla HTML. It had errors like wrong character encodings and unclosed or misspelled tags. Markdown solved all this problems. The main content of the new website is provided through Markdown and the layout is added through CSS.
The new website also needed an RSS feed. For the old website I installed Wordpress to fulfill this need. But it felt like an overkill to use a full featured blog system to provide a RSS feed. What I really wanted to have is an easy way yo create an Appcast.
Because of the success with Markdown I wanted to extend its usage to provide the content of a news page which shall also have a RSS feed. The source for both shall be a single Markdown file.
From the work for Searchlight I already knew how easy it is to create a RSS feed with Ruby and its RSS library.
As I use the Markdown file for both the website and the RSS feed I wanted to hide some of the RSS meta information. To do this all the RSS metadata is entered as an unordered list. Elements which shall be hidden on the website have to be in a sublist. With this content structure it is easy to hide the elements of the sublist with CSS (if you need an example you can have a look at the CSS from CASE Apps).
So a new entry for the RSS would look like this. The entry is started with a h3 element. To define a h3 element with Markdown you can use the triple-# syntax. After that the content for the RSS element follows. At the end of the entry you add RSS metadata as a key/value pair in an unordered list.
### Sample Entry ### This is the text that shall be shown as the content of the RSS entry. You can any *Markdown* element in here. Metadata is entered in an unordered list at the end of the entry. * Date: 2006-06-27 21:30 * Link: http://caseapps.com * File: Path-To-A-File-for-an-Enclosure
If you want to give it a try you can download Markdown2RSS a package which includes the ruby script and a sample. You need to have a working ruby installation on your system. I’m using version 1.8.4 as of this writing. The script uses the ruby implementation of Markdown called BlueCloth which is included in the download file above.
Create a sample RSS by executing createExampleRSS.sh.