Backlinks and forward links at the footer of every tiddler?

Stroll has a feature showing links to a tiddler at the bottom of the tiddler even with options to show the full text or a part of it. I’m looking for a way to install such a feature in Node.js. However, I would like a centralized solution so that the plugin, for example, would be available to all my wikis through their respective tiddlywiki.info.

I would greatly appreciate some guidance in this.

Ok, I see that by your focus and choices you are treading on less common paths.

If you have a set of tiddlers that make up some changes to a wiki there are a range of ways to share them between wikis. It really does make a difference how many wikis you wish to have?

The following are quick and useful but the first allows you turn them into a plugin;

Export a group of tiddlers as a JSON file.

  • This can be dragged and dropped or imported very easily
  • If you import a JSON file as you are looking at the $:/import (before import) you can rename this tiddler and change the plugin-type field to plugin. Delete the status field.
  • You now have a plugin

Other methods I use on demand

  • Import a JSON package as above
  • Use Marios bundler plugin
  • use my bookmarklets site https://bookmarklets.tiddlyhost.com/ to make a plugin or bundle into a Bookmarklet. You install this in your bookmarks with a click to install the tiddlers.

Installing plugins in Node.js

You will be able to install you plugin created above on Node so it is available to all wikis just like any plugin. Exactly how I am not sure.

  • Before making your bundle perhaps rename tiddlers if possible to follow the naming standard $:/plugin/yourbrand/tiddlername(s)
3 Likes

Thank you for this comment. I was very pleased to read it! The truth is, as I read somewhere, as a pensioner I’m someone who has finally solved the problem of work, and now spend my days inventing problems. :laughing:

Truly though, your suggestions on how to make a plugin are very useful and once I get the wiki working as I want, I’m going to try them.

I don’t call myself a pensioner but retired, even that is not perfect, perhaps just “free” :nerd_face:


ha Ha, good one.

Here is a partial solution, based on a slightly updated version of the excerpt-list work presented in Creating a glossary, not an index. That tool gives a short excerpt of every tiddler in the supplied filter. We wrap that up in a ViewTemplate, which adds a <details> element in a footer if there are any backlinks. The body of that element is just a call to the excerpt-list with the list of backlinks and a class name. We add some CSS to display the lists with this class in a compact format.

You can test this by downloading the following and dragging the resulting file onto a wiki backlinks.json (1.5 KB). If you try it on tiddlywiki.com, open a tiddler, say, Filters, and you can expand the footer to see something like this:

This always shows excerpts. If you want a configuration option to choose between showing the excerpts versus just showing a plain list of links, it should be straightforward.

I don’t have any experience with this. My wikis rarely share plugins, and only occasionally run from the same machine (except in development.) So I usually simply drag-and-drop plugins into my wikis. Tony’s advice looks good for creating a plugin for single-file wikis. But I assume the Node and Plugin documentation on the main site would get you to this.

Thank you for the suggestion. I’m currently working on the system that was sketched by Grok in his TiddlyWiki must-read ebook, specifically in Chapter 7, Creating a List of Links and Backlinks. I’m going to use Shiraz’s styles to toggle hiding the backlinks and links in each tiddler.

It cannot be made as sophisticated as Stroll or possibly other plugins dealing with this matter, but it will be adequate for my needs.

Actually I did something incredibly reckless. I was doing this development without any version control. In the end I lost a full day’s work, but In my case it was a fool’s day’s work. I restarted, but I’m going to do a backup just before every crucial (meaning non-recoverable) stage.

Just for the record, the book is Grok Tiddlywiki, and the author, Soren Bjornstad.

Sorry to hear that. Glad to hear it was not more damaging.

I would suggest making a strong habit of doing that regularly. For me, I have a manual cadence of one backup every 10-15 minutes of work on content I care about. But for additional safety, I often do any tricky work in an external wiki rather than my content ones. Since I use Node and git, my backup is simply another commit/push to my git environment. I keep saying that I will one day automate that.

1 Like

With a single file TiddlyWiki I used to make regular backups. I even used the TiddlyTools Saver feature for automatic saves, but with Node.js it’s a new experience and I’m still in the dark.I suppose that a script in Linux could be made to run frequently for backups.

fwiw, my node backup strategy uses git, which gives me a (non-integrated) version history too.

Every few days I run a script which this as it’s relevant core:

git add *
git commit -a -m "${commitmsg}"

It also gets run either side of a big change - eg, big tweaks to my custom CSS, or a notable plugin.

2 Likes

In my single file wikis, online wikis and in the past node wikis, Backups remain important, but I find the local storage plugin useful because I may loose power or break my wiki/browser (not so often). Edited tiddlers including those in a draft state are saved continuosly in local storage (committed to disk). As soon as you save a change. its removed from local storage so you are not leaning on it too much.

  • I only save on demand in large wikis, in small ones autosave and at close down.

With node, drafts are pushed to the server on any change (within a couple of seconds anyway) which then saves them to disk immediately. In theory I shouldn’t losing a draft if I lose power on either the browser machine or the server running node - though I’ve not tested that. I can also start a draft in one machine, and pick it up and continue it in another - something I’ve done a few times.

My understanding of the local storage plugin is that it’s super useful if you’re editing and connectivity fails for some reason (server offline or internet fault).

Finally I found a solution and it’s excellent. I was reading Shiraz’s website and there I found out about Node Explorer. Such a versatile feature and it’s combined so well with the details or slider macro. I saved myself a lot of time and frustration and I’m certain that I would never be able to achieve the sophistication of Node Explorer.

1 Like

I started to write one like this for you, because in some ways it is really simple. however as I am struggling with a cold I was too slow. But as your have found, most obvious solutions are already available and in particular @Mohammad has shared a lot of them already. it is always a smart move to mine his work for solutions.

A key benefit of tiddlywiki script solutions is they are readable and open source so you can see how they work and learn from or customise them.

2 Likes