Changes to the Source; MetaTags, Excerpts & Comments
By Oli
At 1:40 PM · Friday, 3 October · 2003
To Coding · HTML · Weblogging
I’ve been working on improving my MT templates. Here’s what I’ve done:
First I finally added some metatags (despite metatags being dead), culling as much information as I can from MT tags. This is done in the spirit of Mark Pilgrim’s Million Dollar Markup. I’m adding DiveIntoAccessability.org-style metatags now.
Adding these tags took me into the often unintelligible world of Dublin Core. They surely need a quick ‘n’ dirty introduction for web coders. The closest I found via their site was Expressing Qualified Dublin Core in HTML/XHTML meta and link elements
(!). However you still need to consult DCMI Metadata Terms
to actually find out what the 15 Metadata Elements and the additional Terms are. Then if you want to use Terms, you’ll probably need to refer to Dublin Core Collection Description Application Profile
(complete with awful rollover block linking, so you can’t copy ‘n’ paste easily). From here I finally worked out how to tag a monthly archive using the coverage element, but not before having to read about the DCMI Period Encoding Scheme
and the W3 Date and Time Formats note. Ugh.
I found a couple of tutorials at WebReference.com, for XML (kinda useful) and HTML (useless). If metatags are this annoying to implement, I’m glad they’ve died :-)
Next I wanted to establish a system for displaying long stories differently to short ones on index pages. I only use “Extended Entry” for Brad Choate’s MTKeyValues to generate short, informative URLs (url=desired_name, just a simplification of the entry’s title). I was thinking to use MTKeyValues for long entries, then add another KeyValues tag to test against. If the tag was true, I’d only display the entry’s Excerpt on the home page and in indexes. Now I’m wondering why I should bother adding story to the Extended Entry at all — I can just test for a KeyValues tag and use that to display the Entry or Excerpt as necessary. This is what I’ve implemented, but maybe I should just show the Excerpt on index/archive pages. I think I’ll try this on date-based archives, and see how it feels. Unfortunately there’s no <$MTEntryIfExcerpt$> tag. I installed Adam Kalsey’s MTWordCount to get the word count on the Continued…
link, by the way.
Finally I’m working on changes to the comments submission forms. I’ve already editedsupplemented my Sanitize-approved tags to(GlobalSanitizeSpec br/,p,a href,strong,em,ul,li,blockquote) with the following tags and tag attributes (ones with a *) ol,q,acronym,kbd,code,dl,dt,dd,span,ins,del,* id,* class,* title,* lang,* xml:lang,* cite,* hreflang,* charset (new ones are emphasized, the * ones are tag attributes). Now I want to get a usable and validating form (I’ll probably … borrow from Jeremy Hedley at Antipixel ;-) After that maybe a style guide so I can remember/follow the coding rules I’m developing. Fun fun!