Auto-links

Most wikis require you to perform one of two contortions to create a link:

In both cases, you need to know in advance that you plan to create a link, and be enough of a disciplined philistine to overcome the effort and overlook the ugliness.

Auto-links are the solution [1] - here's how they work. Say you create a page called 'Camel case'. Now, type Camel case anywhere else, and that 'Camel case' text will be turned into an auto-link as you go. In other words, the wiki notices that you've typed the name of an existing page in the midst of your text, and automatically creates a link for you. If you go back and edit the text, the link goes away. [2]

Links between pages become evident to readers without any extra effort on the part of the writer. If I type 'MySQL' and an auto-link appears, it's easy to see that a relevant page about it already exists.

Having used such a system for a long time, I have come to appreciate the tiny flash of satisfaction at seeing a link appear with no extra effort, confirming that the page does indeed exist [3], and making navigation while editing a breeze. Pages that I wrote years ago are now festooned with links to pages that were created long afterwards. Indeed, the most satisfying feeling of all is when an auto-link pops up to a page I'd forgotten I wrote. Lazy serendipity!

[1] see Per Sederberg's implementation in Emacs Freex mode, though we called them 'implicit links' back then

[2] To do this the way God intended requires running a regex containing all the pagetitles in your wiki over what you type on every keystroke - this is very nearly instantaneous for even 10k documents.

[3] For extra points, allow pages to have multiple aliases, so that (for instance) 'database', 'databases' and 'MySQL' all point to the same page.





Belongs to these tags