OpenSearch and Movable Type
Amazon introduced OpenSearch at ETech yesterday. Awesome. It just goes to show you that RSS is becoming the standard transport for content, and this is a great example of how RSS is getting more and more valuable as it gets more and more invisible.
I wanted to dig into OpenSearch a little bit, so that's just what I did. If you have a blog run by Movable Type, here's what you have to do to have your own A9 column. Just follow these steps.
- You have to create an alternate search results template. This is the one part of MT that isn't exposed via their UI. Just download this file and put it in your search_templates directory with the name opensearch.tmpl. (You can do this by going to your MT install, cd search_templates, then wget http://www.burningdoor.com/eric/files/opensearch.tmpl)
- You have to add one line to your mt.cfg file:
AltTemplate opensearch opensearch.tmpl
- Enough of the command line. Now you can use the UI to create a new index template. Call it "OpenSearch Description", make the output file be opensearch.xml, and paste the contents of this file into the text box. You might want to tweak a few of the tags to be appropriate for your blog. Make sure you build the template.
- You're done! Now go to Create New A9.com Column and enter the URL of the opensearch.xml file you created. Share and trade with your friends.
If you want to see an example for this blog, you can see my opensearch.xml file, and a sample search results page.
I'm not sure how useful this would really be for us small publishers, but I imagine this could be nice for some larger publishers out there. FeedBurner doesn't quite work with this yet because we can't pass through parameters to the source feed, but that would be a nice service we could offer (stats on search queries maybe?).
Nice job, Amazon.com!
Comments
Hi,
Nice article.
I was able to update my MT blog based on yuor instructions.
There is one glitch in your opensearch.tmpl.
On line 10 where you describe
openSearch:startIndex the tag does not end properly :-)
Posted by: George Chiramattel | October 20, 2005 01:47 AM
Whoops ... thanks for catching that, George!
Posted by: Eric | October 20, 2005 08:12 AM