Saturday, 02 February, 2002

Indexing Revisited

I've been thinking a lot lately about creating an index for my Web diary (see January 19).  After looking around a bit, I've decided that I'll have to create my own application to do it.  I'll come up with a format for anchors in my diary entries (something like 20020202 for February 2, 2002) and insert those anchors into the HTML.  My custom program will parse the HTML looking for those links, and then prompt me for index keywords for each topic.  I'll store the keywords in a database and the program can generate the index automatically in whatever format I like.  This doesn't eliminate the problem of an entry's location changing after three months, but it eliminates my having to worry about it.  If I re-generate the index every time I post, it'll always be up to date.

That's still not ideal.  Ideal would be if there was a standard include syntax for HTML.  What I really wanted to do was create the diary entries in their respective months' files, and create a diary template (this page, for example) that reads something like this:

Put all of the introductory stuff here.
<include "December2001.html">
<include "January2002.html">
<include "February2002.html">

I was very surprised to find that no such thing exists in the HTML standard.  Or if it does I haven't yet found it.  I could do it if I set up Microsoft Front Page Server Extensions on my Web, but my experience with that technology has been less than satisfactory and I'm not willing to put up with its flakiness.