Man, there’s nothing interesting going on in the world of the Internet today.
Here’s some news about kennsarah.net: I’ve discovered server-side includes. Since my webhost is running Apache, I can use the standard syntax for includes which looks something like this:
<!--#include virtual="../relative/path/to/file.shtml"-->
The question is, of course, what in the world is this good for? Well, in order to update different aspects of this site, I’ve been “versioning” different parts of my HTML code. You can see this if you view the source for the site: the banner has a version, the left column has a version, and so on. Once I’m happy with a tweak, I’ve been taking that bit of code and cutting and pasting it to the different templates across the website–a tedious procedure, at best.
With SSI’s, I can create templates for each segment of my code (such as for the Banner, Left Column, and so on), which can be “snapped into” the Main Index, Archive, or any other templates. Any templates with the <!–#include–> tag need to be renamed to filename.shtml to indicate to the server that the file needs parsing before being served to the end-user.
John Bell had pointed out that MovableType also supports variable includes but, as with most MT solutions that I’ve seen, the code for the included templates is merged into the calling templates when rebuilding the site. That’s nice, but can (unnecessarily) cost some disk space on the server (although it is useful to point out that I’m wasting just as much space with the current monolithic setup I have now). Another issue is that there’s no way to call that bit of code from another blog on the site because MT includes are limited to the scope of one blog.
The result? My HTML code can be broken up into easily-managable pieces which can aid in maintaining current templates and quicken development of new ones. The cost is a tiny bit of server-side processing before the page is served. My résumé shows the result of a SSI to a bit of code that is generated by the main site blog. Boo-yah.
Note: this is not an original idea by any means. Mark’s been using SSI since April.
Update: I just finished this tonight–the whole site is now as modular as a Lego project.