What is Tiddlywiki?

Tiddlywiki is a tool for taking notes, linking them together and organising them with tags.

It isn't a web service, your data never needs to leave your device. It's software that you download and keep, which happens to run in your browser.

What makes it so interesting is the extent to which it can be modified. You can customise every aspect of its UI from within the program itself.

Hmmmm.... what is it? I'm still not sure how best to explain it, and I've been using it enthusiastically for years.

In it's most basic form, Tiddlywiki is a "note taking" application - it lets you create, edit and organise pieces of information called Tiddlers. You can create links between Tiddlers and you can tag them for organisation.

What makes Tiddlywiki unique and endlessly fascinating is that, by default, it stores all of its own state in the same HTML document as its own code. It also stores most of its own code in the same format its content, meaning that you can edit the source code of the application from within the application. Mind = blown, amirite?

Lots of functionality is exposed through "Wikitext" widgets, which are an extension of HTML that let you do things like listing all the tiddlers with a particular tag or "transcluding" the contents of one Tiddler inside another.

Try it for yourself

The easiest way to understand what it is, I think, is to actually use it.

To acquaint yourself with Tiddlywiki, head over to the website.

Scroll down the find the download link and download the file which should be called empty.html.

Congratulations! You are now the proud owner of a Tiddlywiki!

Start a new folder for this project and put the file in there. Make a copy of the file so that you can start again from the original without needing to re-download it. Get into the habit of making copies of your file.

Now open the file in your web-browser.

Now make a new Tiddler and save the file.

The chrome saving mechanism is the pits and, worse yet, the Tiddlyfox extension will probably soon cease to work.

The main problem with the download saver is that it discourages frequent saving and opens you up to an increased risk of data loss.

Whilst it's sad to see Tiddlywiki hamstrung in this way in the browser, for our purposes the fix is to run Tiddlywiki as a node process instead of in the browser, which we will do when we set up our wiki to generate static sites.

For ordinary users worried about data-loss there are already some feasible solutions to mitigate the risk of data-loss. For example Danielo's CouchDB plugin stores a copy of all your data in the local storage.

I must look into that more closely.

Here's how to basically drive Tiddlywiki....

So, we got saving out of the way - hopefully you have an easy solution instead of a hard solution to that problem.

Tier 1: Things that "definitely" won't break your wiki

Making (simple) Lists

Tier 2: Things that "probably" won't break your wiki

Tier 3: Some things that will break your wiki

Lest you think I protest too much about the possibility of breaking Tiddlywiki, I will show you some innocuous maneouvres that will definitely break your wiki. You can play along if you like

Tiddlywiki under firefox

I tend to use Tiddlywiki in it's single-file configuration with Firefox and Tiddly-fox. I can work without worrying about the save button.

This still leaves me vulnerable to losing any work I did since I made a copy

How to recover your wiki.

When your wiki breaks because you accidentally delete a tag from an important system tiddler or create an infinite list that locks the browser up, hopefully you will just be able to start again from the copy you made two minutes ago.

In the unfortunate case of finding that you created content which only exists in a wiki that is now borked in some way then firstly, lament. Lament your own bravado, for it has once again led you to stumble into error.

Then fix it. It's probably not that hard.

Firstly, make a copy of whatever file you do have so that you have more than one chance to save what's in there. Then try disabling the thing that went wrong. Try safe mode. Try importing the contents into a clean wiki and just bringing across the bits you need to save.

When to take extra precaution

When you are doing anything that edits UI or may create recursion etc.