We rely on Markdown-formatted text files for TidBITS articles, but one of the slight annoyances of doing so has been that we haven’t been able to use Quick Look to glance at the contents of an article, even though it’s just text. Luckily, this is a solved problem (and the solution isn’t even new — it’s just that I finally got around to looking for it).
Said solution is Phil Toland’s free QLMarkdown generator, which has worked perfectly in my testing. To be recognized as Markdown by QLMarkdown, files need to have one of the following filename extensions:
To install QLMarkdown, download the latest version (currently 1.3), expand it, and copy the
QLMarkdown.qlgenerator file to either
~/Library/QuickLook (to make it available to just your user) or to
/Library/QuickLook (to make it available to all users). Remember that if you’re using OS X 10.8 Mountain Lion or 10.7 Lion, you’ll need to hold down Option and
choose Go > Library in the Finder to reveal the user’s hidden Library folder (for details, see “Dealing with Lion’s Hidden Library,” 20 July 2011).
If you don’t like the look of the text in the previews, you can change nearly everything by modifying the built-in CSS stylesheet. Follow these steps:
QLMarkdown.qlgeneratorfile and choose Show Package Contents.
In a text editor like BBEdit or TextWrangler, open
styles.css, make your desired changes (I chose a different font and increased the font size), and save. In my testing, there was no need to do anything else to have the new styles honored — just preview another file to see them.