Delish!

| 2 Comments

I've really liked Jason Kottke's use of "remaindered links" on his site, interspersing links and commentary between longer posts. I've been wanting to do the same thing with this site, but felt that Movable Type's user interface is a wee bit too obtrusive for quick posts. Not that that's a bad thing — Movable Type's UI encourages longer, thought-out posts in the same way that Blogger's UI encourages shorter, quick posts.

Last week, I set off to find a solution, and as you can tell from earlier posts, I found one, using del.icio.us and the MTSwitch plugin.

del.icio.us has been my bookmark manager for just over a year now, and I had already integrated it into this site's layout using Magpie. This worked nicely for a linkblog on my sidebar, but integrating it with MT entries would be trickier. I decided to look elsewhere.

As it turns out, del.icio.us has an experimental (and thus poorly-documented) feature that allows for daily blog posting. There are a number of tutorials that show how to get it set up with your blogging tool of choice; I used Common Craft's Movable Type tutorial since it was the first one I found on Blingo. The result? Once a day, del.icio.us posts a digest of my latest del.icio.us entries directly to my Movable Type blog. Nifty.

I wasn't satisfied, though, because there's no capability to specify the XHTML that del.icio.us sends your way. In particular, I didn't like the format of the entry title ("links for YYYY-MM-DD"), and I didn't want users to comment on del.icio.us entries (at least, not on the homepage).

Enter MTSwitch. This plugin introduces a switch case structure in Movable Type's tagging language, allowing you to test the value of just about any Movable Type tag. Alongside MT-Blacklist, this is an essential addition to the core MT installation.

I filtered the index page entries by entry category, like so:

<MTSwitch value="[MTEntryCategory]">
<MTSwCase value="del.icio.us">
<div class="entry delish">
<h2 class="date">del.icio.us links for <$MTEntryDate format="%B %e, %Y"$> </h2>
</MTSwCase>
<MTSwDefault>
<div class="entry">
<div class="indexentry">
<h2><a href="<$MTEntryLink$>"><$MTEntryTitle$></a></h2>
<p class="date"><$MTEntryDate$></p>
</MTSwDefault>
</MTSwitch>

It's fairly straightforward, and lets me write pretty del.icio.us entry titles. I also have the flexibility to introduce some new classes, so that I can style the del.icio.us entries differently, as I have. You may catch some unclosed tags in that code—don't worry, I take care of them later on in the page.

So that's it. Nothing very clever or ground-breaking, but I figured I'd document it, and it's something I can write about.

2 Comments

Interesting! I think it works out much better that way, too.

I agree. Even though I haven't posted much here, I have been posting quite a bit in del.icio.us. This is a nice way to give that content more visibility.

Leave a comment

Pages

Powered by Movable Type 4.32-en

About this Entry

This page contains a single entry by Aliotsy published on July 11, 2006 2:26 PM.

links for 2006-07-11 was the previous entry in this blog.

links for 2006-07-13 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.