No Seppuku Allowed

Josh
Post Date: 3/15/2009 11:51:29 PM
Message:
It would seem that the website is going through a sort of mini-renaissance.

As is customary, with me at least, when I work on a hack or am working out some new feature for a site, I tend to work on multiple sites at the same time. Years ago, by years I mean at least two, I have ventured the idea of possibly creating a sitemap for this site (as well as the others I work on). However, I came across the problem that seemed to have no solution in mind: this website's pages are created dynamically. I recall starting my little research into the matter and looking into a couple of different solutions, but nothing really caught my fancy and so the plot never came to fruition. I even downloaded software for the specific task, but for whatever reason I never came through with my plan.

It must have been last week when I was watching the latest episode of Code Geass on adultswim (website) that I became quite bored and started exploring the site. Eventually I decided to take a look at their sitemap (wondering what kind of map they could possibly have), earlier in the week I was discussing the matter of a sitemap for mecomiami.us with our current provider, so the topic was fresh on the mind. I took a look at their sitemap and I saw something quite interesting, not a sitemap in the traditional sense, but a human-readable sitemap. I checked the source code and it would show me a regular sitemap.xml file with the corresponding structure, but what I saw when looking at the file was clearly a page.

After some digging, it turned out they were using the very same software I had downloaded all that time back. However, what I wasn't aware of was a little project that began in 2007 to create a sort of stylesheet for XML files; in other words, formatting for sitemap files and XML structured data. This was phenomenal, so I got to work (first on Meco).

The first problem was getting all the pages to present their own title, meta title, and meta description. I had put little thought into it before, but page-specific meta data was important, but I was lazy about it and simply used an include file for meta data. So the first task was to move around some of the code on the actual pre-compiled pages. So now the page is accessing the database record sooner than before and retrieving some additional data I wasn't bothering with prior to this. Now the title and description is being written on the fly using data direct from the record in question (in Meco's case the machine details [make model] and some more details in the description), so for joshuaricart.com the changes are most effective on pages primarily in the rant review. Each and every rant has its own page with its own title and its own description (basically 100 character snippet of the actual message body). I managed to perfect it while in the office yesterday, Saturday, and began the task of implementing this new feature across all sites.

Long story short, the site finally has its very own sitemap. Though the sitemap is not currently updating dynamically, it is still quite up to date (the only missing pages would be the ones from new rants such as this one). In the future I will write a quick hack to the sitemap gets a new line including whatever new rant comes along, but for now what we've got is quite some. The sitemap currently shows 530 URLs; safe to say that I was quite shocked to see that the website really had that many pages.

I haven't added any direct link to the sitemap, but for the curious you can simply go to sitemap.xml to view the website's complete link list.

Sorry for the long rant, but I'm quite pleased with myself.

<< Prev      Next >>
Return Home




Maintained by a Neo Tokyo Techie
©2004-09 Josh Ricart, all rights reserved.
I laugh at your misfortune