So we have it from the horse’s mouth that Google doesn’t really use the meta keywords tag in its page rankings. Ok then.
This got me thinking about producing content-specific meta descriptions which are more useful. I’m going to use Tracktime Asia website to illustrate.

In textpattern I use the following approach (along with the great rah_metas textpattern plugin) to output meta description code on a per article basis. BUT what if you’re using sticky articles as ‘static pages’ or viewing an article list? The plugin won’t work in those situations.
One way is to test to see if we’re looking at an article list or not (eg like a News page listing several articles).
<txp:if_article_list> <txp:output_form form="meta" /> <txp:else /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <txp:rah_metas description="Tracktime Asia: Corporate Entertainment, Product Launches, Slide Control and Driver Training at Shanghai and Zhuhai." description_replacement="1" description_from="meta_description" prefercontent="1" robots="index, follow" author="Tracktime Asia" description_trail="" copyright="Copyright © <txp:upm_datetime format="%Y"/> Tracktime Asia, Code: stillmovingdesign"/> </txp:if_article_list>
If we’re looking at an article list we output the form called “meta” which contains the code below (simplified for the sake of this example):
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="description" content="<txp:section title="1" /> - Tracktime Asia: Corporate Entertainment, Product Launches, Slide Control and Driver Training at Shanghai and Zhuhai." /> <meta name="author" content="Tracktime Asia" /> <meta name="robots" content="index,follow,archive" />
You can see that in the code above we’re outputting the Section title too. You could get really fancy here and test for specific sections and output more descriptive information. Like:
<txp:if_section name="about">Some REALLY descriptive text about the About section!</txp:if_section>
If we’re not looking at an article list but rather an individual article we want to get specific with the meta description which is where the rah_metas plugin is useful.
...<txp:else /> <txp:rah_metas description="Tracktime Asia: Corporate Entertainment, Product Launches, Slide Control and Driver Training at Shanghai and Zhuhai." description_replacement="1" description_from="meta_description" prefercontent="1" robots="index, follow" author="Tracktime Asia" description_trail="" copyright="Copyright © <txp:upm_datetime format="%Y"/> Tracktime Asia, Code: stillmovingdesign"/> </txp:if_article_list>
In textpattern each article has a custom field called “meta_description” available to it. It outputs whatever is in that custom field. Alternatively, if that custom field is empty it’ll use the default description or – if you ask it to – either the body or excerpt field. It’s really worth a visit to the plugin page and the associated textpattern forum.
I know SEO is a bit of a ‘dark art’ in some ways. The point of all this is to give Google a reason to crawl your site and so it can differentiate between your content. Having a unique description per page might just help it along a little.
On a related note here’s the code I use to generate the browser titles for Tracktime Asia.
<title>Tracktime Asia <txp:if_section name="">| Home <txp:else /> | <txp:section title="1" /></txp:if_section><txp:if_individual_article> - <txp:title /></txp:if_individual_article></title>
It’s a similar approach.
You can use the same method to produce the canonical link element in your header. This works in a individual article or ‘sticky’ article section arrangement. It most likely won’t work with categories.
<txp:if_individual_article> <link rev="canonical" href="<txp:permlink />" /> <txp:else /> <link rev="canonical" href="<txp:site_url /><txp:section title="0" />" /> </txp:if_individual_article>