The inexorable convergence of wikis and blogs continues, this time as the
result of a request from a user (who happens to be a big-name author and
all around nice fellow; let’s call him Joe). It started with a simple
enough request. Joe wants to put his articles under RubLog, but also wants
the capability of moving them around as he recategorizes his site (perhaps
he had an article on TestFirst that was originally in the XP category, but
then moved to a new category dedicated to testing).
Two things would go wrong if he moved the article. First, all the external
references to the article would break: it used to be called
XP/TestFirst.rdoc, and now it’s Testing/TestFirst.rdoc. Second, any
WikiWord references to the article in the XP directory would break, as
RubLog only looked for these in the same directory as the referring file.
So, between us, Joe and I cooked up something new. It comes in a number of
parts.
- WikiWords are now potentially global. If RubLog finds a matching article in
the same directory as the original, it uses that as the target. Otherwise
it searches the whole blog.
- If multiple articles match, it generates a new kind of link that will
display all of them. Saying that another way: a hyperlink in RubLog can now
reference more that one target.
- That link also allows external reference to articles by name. For example,
pragprog.com/pragdave/=MoreWikiBlog
will find the article(s) called MoreWikiBlog whereever they occur
in the site. This solves Joe’s migration problem. If he gives out
these =xxx links, they’ll work even if the articles move.
And all this has an interesting side effect. Say Joe creates a table of
contents file (call it Index.rdoc) in each of his article
directories. Each of these separate files is free standing, and has links
to the articles in that particular directory. To display this index, Joe
could publish the URL
joe.com/blog/Testing/Index.rdoc
However (and here’s the fun part), Joe could also publish the URL
joe.com/blog/=Index
This would display all of the index files on his site on a single
HTML page, giving the world a nice synopsis of all his articles.
I quite like this: too often we try to organize our world into artificial
hierarchies. This kind of capability lets us cut across these; with this
kind of blog you can now have temporal, hierarchial, and name-based views.