I have a website I wrote that I’m thinking of moving to TiddlyWiki. Everything seems easy to port over except that the URLs for various pages have been published in places I cannot change. (Some are in print media.) So I’m wondering, is there some facility that would let me interrupt startup and either
redirect to the proper URL or load the tiddler after a slight fiddle to the fragment (hash) string?
The bulk of the current entries look like this:
http://example.com/#/2023-07-26
But there are others like
http://example.com/#/pages/about
http://example.com/#/search/foo+bar
http://example.com/#/series/My+Series+Title
http://example.com/#/person/Jane+Doe
http://example.com/#/topic/Something
I believe all current URLs can be redirected by changing +
to %20
and replacing the initial #/
with just #
. I can code that easily. But I don’t know how and where to add the code that does it. I’m comfortable with JS, and there’s part of me that would just go in and hack the core for a one-off wiki, but I’d like to know if there are already hooks for this sort of behavior. Are there? Are they documented somewhere?
(I have no problem naming later works to avoid collision by never starting a tiddler name with a /
.)
Is this behavior available? Can I hook into the loading behavior to add URL fragment conversion behavior?
(Mostly irrelevant) Background
For those who want to know, I am one of those gadflies who writes often to my local weekly newspaper, usually about national political topics, often in response to other such gadflies. At some point, wanting to play around with various bits of web development I’d been away from, I decided to publish these letters online. I’ve tweaked it over the last few years, fixing problems, etc. But I would love to stop some of the maintenance, and at least consider converting it to TW. It’s stored at GitHub - CrossEye/letters and hosted at http://letters.sauyet.com/. (Please avoid if you’re allergic to progressive political ideas or discussions of American politics/governance.)