June 21, 2005

Technorati Tags and Movable Type


Technorati, a leading blog search engine and index, has made it very easy for blog authors to get their "tagged" blog entries into Technorati's tag index. What is a tag? A tag is a type of category, and the process of tagging a simplified categorization method for your entries. The concept of tags has become popular with services such as del.icio.us and Flickr. By creating tag classifications for your weblog entries, you make it easy for Technorati to index your blog entries by tags that you specify. With Technorati tagging, you get to choose how you want your weblog entries to be classified, in contrast to algorithm-driven search engines like Google that make their own classifications based on what can be derived from the keywords in your text. Thus, people searching Technorati for weblogs having to do with book reviews will find blog entries in which the weblog author has categorized her entry as having to do with book reviews.

How to incorporate Technorati tags into your MT blog

First, Ping Technorati

There are several ways to incorporate Technorati tags into your Movable Type weblog. All methods require that you ping Technorati when you have saved a new entry. If you haven't already, you can set this up by going into your Weblog Config, Preferences section. Under "Publicity / Remote Interfaces / Trackback" select technorati.com as one of the sites to notify when you update your blog. Alternatively, your individual entries can ping Technorati by placing the Technorati ping URL - http://rpc.technorati.com/rpc/ping - in the URLs to Ping section of your Edit Entry screen and saving your published entry.


Create a link

The easiest way to create a tag that will be picked up by Technorati's tag index is to create a link in your entry body around a word that you would like to be made into a tag. For instance, if your entry is about "chickens", you could wrap a link around any instance of the word "chickens" in your entry body that would point to the Technorati index page for chickens.

Use the following tag convention:

<a href="http://technorati.com/tag/tagname" rel="tag">tagname</a>

like so:

<a href="http://technorati.com/tag/chickens" rel="tag">chickens</a>

So in your entry body, when you write about chickens, the link is tagged back to Technorati (click on link to see example).

You can also tag multiple words, for example Movable Type, like so:

<a href="http://technorati.com/tag/movable+type" rel="tag">Movable Type</a>

Technorati looks at the tags presented in the entries you show on the Main Index of your weblog. If you use extended entry sections that don't appear on the Main Index but continue over to an archive page, the tags in the extended section of your entry will NOT appear in the Technorati tag index unless you use the MT default atom.xml index template or take some additional steps to modify your atom template. The default atom template feeds the full entry body and extended entry. If you have changed your atom template so that the content section contains less than the full content of your post, , you should remove the <content type="text/html" mode="escaped" xml:lang="en" xml:base="<$MTBlogURL encode_xml="1"$>"> .....</content> section from the template, so that Technorati understands that the atom feed is only showing a summary, and won't index it as if it were a full article. Removing the content section will also instruct Technorati to look elsewhere for the full content of your weblog post.

Use default RSS and/or Atom templates

If you use an RSS 1.0 template, or the default RSS 2.0 or Atom templates that come with version MT3, and you use category archiving for your weblog, and you automatically ping Technorati when you update your site, Technorati will automatically find your feed and extract the primary category you have assigned your entry and turn it into a Technorati tag for that entry. Just make sure that you have the link rel="alternate" lines for those feeds that you use in the head section of your Main Index template. By default, those lines are the following:

<link rel="alternate" type="application/atom+xml" title="Atom" href="<$MTBlogURL$>atom.xml" />
<link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="<$MTBlogURL$>index.rdf" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<$MTBlogURL$>index.xml" />

Adjust templates for multiple categories

If you assign multiple categories or subcategories to you entries, you can capture all of these categories as tags by following the instructions above for using the default RSS and Atom templates, and by making the following modifications to at least one of these templates:

For Atom 0.3

Replace <MTIfNonEmpty tag="MTEntryCategory"><dc:subject><$MTEntryCategory encode_xml="1"$></dc:subject></MTIfNonEmpty> with

<MTIfNonEmpty tag="MTEntryCategory"> <MTEntryCategories><dc:subject><MTParentCategories glue="/"> <MTCategoryLabel encode_xml="1"> </MTParentCategories></dc:subject> </MTEntryCategories></MTIfNonEmpty>

For RSS 1.0

Replace <dc:subject><$MTEntryCategory encode_xml="1"$></dc:subject> with

<MTEntryCategories><dc:subject><MTParentCategories glue="/"> <MTCategoryLabel encode_xml="1"> </MTParentCategories></dc:subject></MTEntryCategories>

For RSS 2.0

Replace <category><$MTEntryCategory remove_html="1" encode_xml="1"$></category> with

<MTEntryCategories><category><MTParentCategories glue="/"> <MTCategoryLabel encode_xml="1"> </MTParentCategories></category></MTEntryCategories>

Add global tags to your blog

Let's say that your blog has a single theme, and you want every entry to be tagged with that theme. For example, if you have a cooking blog, it might be of more interest for you to have your entries tagged with "food" or "recipes" than with "appetizers" or "lamb". To do this, you need to first follow the instructions listed above for using the default RSS and Atom templates.

Note that you only need to adjust one of the syndication templates, not all three of them.

For Atom 0.3 and RSS 1.0

Wrap your global tags in <dc:subject> elements like so:


For example,

<dc:subject>recipes</dc:subject><dc:subject>food</dc:subject> <dc:subject>cooking</dc:subject>

Place this section at the channel level directly above your MTEntries section in your template.

For RSS 2.0

Wrap your global tags in <category></category> elements and place at the channel level directly above the MTEntries section in your template.

Turn keywords into tags

There are several methods you can use to have the keywords you have entered into a keyword field for an entry transform automatically into Technorati tags. John of John's Jottings has written a simple Perl script which you can use in your templates if you have installed Brad Choate's PerlScript plugin. Other plugins are MTKeywordList and Technorati Tags from LaughingMeme, and TechnoratiTags plugin from 90% Crud. Six Apart has also released their Tags1 plugin which will turn all keywords entered into the keyword field into tags and at the same time into categories.

I have found the best solution to be a combination of Tim Appnel's mt-tagslite plugin used with MTGlue, and MTCompare.

To get mt-tagslite to parse keywords so that you can input keywords into the field separated by commas, and therefore capture keyword terms that have more than one word, you need to make some changes to the plugin file.

Change the following line (around line 60 or so) from:

@tags{ split( /\s+/, $k ) } = ();

which splits on whitespace to:

@tags{ split( /,\s*/, $k ) } = ();

which splits on a comma followed by an optional whitespace. (Thanks to Darren Chamberlain for the tip.)

You can then use the MTGlue plugin to insert commas into the display of the tags. And you can use the MTCompare plugin to only show the tag display if there are keywords in the field. For example, your code might look like this:

<MTIfNotEqual a="[MTEntryKeywords]" b=""> Technorati tags: <MTGlueContainer><MTEntryTags><$MTTechnoratiTag$><MTGlue>, </MTGlue> </MTEntryTags></MTGlueContainer> </MTIfNotEqual>

Many thanks to Niall Kennedy of Technorati for his suggestions and corrections with this tutorial. Thanks Niall!

Transform keywords into tags - a simple Perl script from John's Jottings
MTKeywordList and Technorati Tags - a plugin from LaughingMeme
TechnoratiTags plugin - another plugin to turn keywords into tags, from 90% Crud
Tags1 - a plugin from Six Apart that turns all of your keywords into tags and categories
Technorati Tags MT Plugin from A Perfect Vacuum - includes a regex keyword separator string
mt-tagslite plugin from Tim Appnel, simple plugin for generating del.icio.us, Flickr, and Technorati tags.
Tags.App - Tim Appnel's commercial application for implementing tags on Movable Type.
Putting del.icio.us tags into Movable Type entries, using the keywords space from Ben Hammersley.

Has this tutorial been helpful? Please consider linking to Learning Movable Type at http://learningmovabletype.com/ . Thanks!


If you would like to send a trackback
please use the following URL: http://learningmovabletype.com/cgi-bin/mt32/mt-tb.cgi/433

» Tagging vs. Categories from a.photoblog.de - The Words
I like the idea of tags. It's the only way to keep a huge amount of data accessible in a convenient way (Technorati for example keeps track of more than 15.4 Million blogs). Yes, I like the idea of tagging......[read more]

Tracked: August 19, 2005 04:41 PM


Thanks Elise . I'm going to try this out on Typepad.

I'm using the Tags1 plugin right now but how do I enter multiple word keywords? It splits everything up, for example the tag Live 8 creates pages for live and 8. Gizmodo.com has got it down, but how did they do it?

Thanks for this information.

Do any of these plug ins include the capacity to *display* your tags on your MT site, the way that they are displayed on Technorati?

Post a comment

(Before posting a comment please see the Comments and Trackbacks Policy. Do you need help troubleshooting your weblog? Please post questions and requests for support at the MT Support Forums. Thanks!)

Remember Me?

(you may use HTML tags for style)

Email to a friend

Email this article to:

Your email address:

Message (optional):