Results tagged “Markdown” from kwc blog

Busy behind the scenes


WARNING: the following entry is terribly boring, and unless you're interested in protecting your MT blog from spammers or XHTML-validating your Web site, I suggest that you skip this entry with only the knowledge that I am hard at work behind the scenes doing stuff that, for the most part, you won't notice.

I've been busy working on this blog, though you won't be able to notice the fruits of a lot of my efforts. If you're especially observant, you might be able to notice that I'm using a new names for the entry URLs, which is part future-proofing, and part protection from search-engine-powered spammers. I used the htaccess trick that I posted about awhile back, though I should have done it sooner, as I have a 138KB htaccess file as a result (I trimmed it down to 99KB on the presumption that certain entries weren't worth forwarding).

I've also been making other tweaks to protect this site against spammers including * changing the name of my stylesheet * changing the names of the category and monthly archive pages: * individual: <$MTEntryDate format="%Y"$>/<$MTEntryDate format="%Y-%m-%d"$>.<$MTEntryTitle dirify="1"$>.html * monthly: monthly/<$MTArchiveDate format="%Y"$>/<$MTArchiveDate format="%B_%Y"$>.html * category: category/<$MTCategoryLabel dirify="1"$>.html * tweaking the comment posting mechanism to be less search-engine friendly * other small tweaks to common wording that MovableType comes pre-installed with and is really easy to search for.

Another big change is that I've been trying to make sure that my pages XHTML validate, which is actually very time intensive, as I have to fix every typo I have made over the past year across 1200+ entries. To assist in this effort, I've been using the validate HTML bookmarklet from Jesse's Bookmarklets, and I have installed Markdown (much to bp's pleasure, I'm sure), as MovableType makes it very difficult to use blockquote's that validate. I'm a bit disappointed in Markdown thus far (limited range of character formatting, limited list interpretation syntax, no width/height on images, etc...), but the ability to generate XHTML-valid output is worth having it around when I need it. I think I might switch to Textile, which has a wider range of syntax, but I'm going to give Markdown a little bit more time to sink in first.

Comments on Markdown


bp left an opening in his entry for me to offer my viewpoint, and seeing as I can't resist commenting, here are my thoughts on Markdown.

Markdown is a fairly simple way for people who write blogs to write their entries without using HTML. For example, "_this_ is markup. I **really** mean it." becomes "this is markup. I really mean it." There are other features for including links, images, lists, quotes, etc... that are, in general, really elegant for people who don't know HTML, and even for people that do use HTML, as it saves both time and effort. It's a whole lot easier to type *bold*, than it is to write <b>bold</b>, and you don't end up with problems where you accidentally forget to close an HTML tag.

Despite this, I don't entirely like it. You can still include HTML in the entry. Initially, this sounds like a good feature. You're typing your entry and you decide that you want to paste in an HTML table, so all you have to do is paste it into your entry. You get the best of both works. Markdown for the simple stuff, HTML when you need it.

In my opinion, this is bad. Markdown takes the characters *, _, [, ], #, `, and >, and gives them special meaning. HTML takes the characters <, >, and &, and gives them special meaning. With Markdown, you have to be aware of both. To me, this is the worst of both worlds, and if you happen to be a user of Markdown that doesn't know HTML, doesn't it defeat some of the benefits if you have to know whether or not you're writing something that looks like HTML?

The ability to include HTML is there for people that know HTML who want to pop out of Markdown when the what to do markup more complicated than Markdown can provide. It's an understandable crutch to provide, but one that hurts users that don't know HTML. I would have preferred this feature not be in Markdown, or for there to be a special switch to go between Markdown and HTML. The benefits would be:

1. You would never have any bad HTML generated by Markdown, which is one of it's goals. You could paste whatever you like in Markdown, and it would guarantee something valid.

2. Users that don't know HTML don't have to, not even a teensy bit.

3. No confusing grey areas where you have to guess what Markdown is going to do. (bp and I got into a discussion as to how to write '-->' in Markdown, which was only solved once we played around with the online Dingus tool. The correct answer was '--&gt;', which is most likely a bug in the current release.)

4. Bonus: it would be an excellent tool for writing HTML tutorials, as it's hard to write HTML in HTML.

BTW, those interested in Markdown might also be interested Textile, which has similar markup, but is geared slightly more towards people that know HTML/CSS. It includes escapes to switch between it's markup and HTML, but as bp pointed out to me, it doesn't have as nice of syntax for doing blockquotes.