Welcome to Geoffrey Swift's βlog. Please subscribe to the Atom feed.


Yahoo! search engine integrated (and not Google)

I've used the Yahoo! search API within my personal site, and now have my own personal search engine. Having registered my "application", it was relatively straightforward to invoke the search engine using REST. The results come back in various formats including Serialized PHP and JSON - for me it made the most sense to use the default XML format. Having written a suitable template in XSL, it was a breeze to incorporate the search results into the site. There is some fiddly DHTML to put a search box in the top right corner of each page. I am pleased with the results, for my effort anyway.

Yahoo trumped Google on this occasion, as they aren't letting anyone sign up for their SOAP based search service. Both are taking data from my sitemap.xml file, but Yahoo allows you to submit an Atom feed as well. I noticed that Google Webmaster Tools reported a page not found in the "Web crawl errors" section. The URI was /~blimey/{sitemap:loc} - which GoogleBot attempted to spider, since my sitemap.xsl file contains the code <a href="{sitemap:loc}"> - d'oh! Google has mistaken my expression in XSL as a literal URL. I added noindex to the meta tag for robots in my sitemap.xsl, maybe in an equally daft way that'll help!

Code matures and delivers gzipped CSS

I've removed the big clunky "valid XHTML" and "valid CSS" icons, since the code is fairly mature and I'm confident it produces valid output. Besides which, I'm using a browser plugin to invoke the W3 validator now anyway.

I also ensured the CSS is sent gzipped where possible, with appropriate headers to allow them to be cached by browsers/proxies. The XHTML, JavaScript and RSS were already delivered in this fashion.

I made some of the code more generic, with a config file as well. This is because I'm using much of the code on another website now. As it is a commercial site, it's a good thing it seems to works OK!

Next job is probably allowing comments on blog posts, or some kind of archive / search facility for the blog.

HTTP Redirect for blog category tweak

I made the site a bit cleaner and removed some repetition in the content. The "updates" and "podcasts" categories each already had their own dedicated php page, to be directly accessed from the main menu. When the XPath query passed to the generic blog page would result in either of these categories, an HTTP redirect automagically sends you there instead. This then ties the blog filtering/navigation into the overall site navigation. Currently this is hardcoded, so I may look into a more generic mechanism to facilitate the addition of further categories into the main menu. Either way the XPath in the query string for blog.php generated by the XSL will work, as it did before.