This is something I’ve used a few times: a way to keep users of an older version of my wiki informed that it now has a new location. I add this tiddler to both the old and new locations:
title: Wiki moved
If you are not at the following location, you are viewing an old, out-of-date,
temporary home for this wiki. Please update your bookmarks and links to point
to the following, and move to there now:
https://path.to/your-new-wiki
Sorry for the inconvenience.
and I update $:/DefaultTiddlers
by adding a new first line:
title: $:/DefaultTiddlers
[{$:/info/url/origin}!regexp[localhost]!match[https://path.to/your-new-wiki]then[Wiki moved]]
[[All My Other]]
Actual
[[Default Tiddlers]]
Now if I visit from the updated location, everything is normal, but if I visit from an old one, the first tiddler I see tells me that I’m not in the right place. If I’m working in Node, and this is served locally (over localhost
), then the message does not appear.
I work at GigantiCorp™, and we like to move things around. Right now I’m going through a move from GitLab Enterprise Pages to GitHub Enterprise Pages. Earlier, I had to move the document from one GitLab Pages site to another, and I came up with this technique. But the old sites are still active, so I simply updated them with this information, and it just works, no hassle at all.
If we wanted, we could add a !match[file://]
clause in there as well, so that if you have a local single-file copy, it doesn’t give this message either. I prefer not to, as I like having that warning there in this case, but there are certainly arguments for doing that too.
It’s a minor thing, to be sure, but I found it a useful technique.