Punting Notanda
Of course, another option would be to drop back and punt.
With subdirectory handling, all I’m really talking about is recursively generating an array of text files from a directory, including any files inside subfolders — i.e. an array of paths. These targets are then walked through a series of steps to generate the HTML files. A simple shell script is then called that synchronizes the local directory with the remote webserver using rsync.
In the middle of that series of steps is a good-sized block that handles Related Articles and tagging. It is also these pieces that over-complicate the subdirectory handling (see 2005 09 30).
My punting idea is to rip those bits back out of the main script and automate them separately, perhaps by a spider or bot that makes the connections between the various articles without my having to do anything more than write the words. I think the idea has merit — I’ll have to mull it over for drawbacks.
There are various ways to deal with both the Related Articles and tags situations.
Rui Carmo’s customized PHPwiki installation for the Tao of Mac has a WikiPlugin called SeeAlso (also Rui’s hack) that draws a table at the bottom of pages with articles to ‘See Also’ — an interesting take on generating that sort of thing.
SeeAlso was originally based off of the standard wiki feature BackLinks — a list of other pages that link to the current page. This is a pretty standard feature in wikiware, and one that is much easier to pull off with a database behind things, but which I handled with a subroutine during the processing of the plaintext files in Notanda, using a separate related.txt file for that article. Not as pretty as I’d like. :)
Tags in the case of this site are really just standard links, but ‘extra’ to the ones in the article. A way of classifying things, sure, but not true tags in the folksonomy sense of the word. I might bail on them in this new version, or rather subsume them back into a new ‘Related’ system.
One way to repurpose tagging in Notanda would be to generate a list of internal links on a given page, and use those as tags to communicate with other features or pinging Technorati or whatever — that way I don’t have to manually add tags at the end for things to auto-classify themselves. That list could also be displayed for the user in a similar manner to the ‘Related Links’ box that Slashdot has on every story (see this story for an example at top right).
I like this idea very much — wikis are supposed to enable creating websites quickly and as frictionlessly as possible (more reducing friction ;) — which also means I should probably (in another couple of versions) begin re-creating some of the other handy wikiware features, like using brackets to create external links, etc.