Getting backlinks from shadow tiddlers

96 views
Skip to first unread message

Soren Bjornstad

unread,
Apr 8, 2021, 2:01:14 PM4/8/21
to TiddlyWiki
Is there any way I can obtain backlinks that exist within shadow tiddlers (i.e., tiddler B is a shadow tiddler that links to tiddler A, and I want to see that link with, e.g., [[A]backlinks[]])? I've placed most of the content of Grok TiddlyWiki in a plugin to make it easy to update in the future, but this seems to have broken the backlinks display (no backlinks are ever detected to anything). I don't see any options to the filter operator or anything like that.

It's fairly important that the backlinks be available, so I'm not quite sure what to do if there's no known way to accomplish this – any thoughts?

Mat

unread,
Apr 8, 2021, 2:43:37 PM4/8/21
to TiddlyWiki
I would think this is accomplishable with the filter ops:

and/or
<:-)

Jeremy Ruston

unread,
Apr 8, 2021, 4:13:42 PM4/8/21
to tiddl...@googlegroups.com
Hi Soren

I can confirm that the backlinks operator does not currently consider links from shadow tiddlers. There would be performance and backwards compatibility implications to changing the default, but we could consider adding an option/switch.

I've created a GitHub ticket here:


Best wishes

Jeremy


On 8 Apr 2021, at 19:01, Soren Bjornstad <soren.b...@gmail.com> wrote:

Is there any way I can obtain backlinks that exist within shadow tiddlers (i.e., tiddler B is a shadow tiddler that links to tiddler A, and I want to see that link with, e.g., [[A]backlinks[]])? I've placed most of the content of Grok TiddlyWiki in a plugin to make it easy to update in the future, but this seems to have broken the backlinks display (no backlinks are ever detected to anything). I don't see any options to the filter operator or anything like that.

It's fairly important that the backlinks be available, so I'm not quite sure what to do if there's no known way to accomplish this – any thoughts?

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2466c53c-b4da-426c-9930-f920995ab05cn%40googlegroups.com.

si

unread,
Apr 8, 2021, 6:15:31 PM4/8/21
to TiddlyWiki
@Soren It's ugly, and maybe you have already thought of it, but you could try something like this:

<$list filter="[all[current]]">
<$vars lb="[[" rb="]]">
<$vars search-term={{{ [<lb>addsuffix<currentTiddler>addsuffix<rb>] }}} >
<$list filter="[all[shadows]search<search-term>]">
<$link> <<currentTiddler>> </$link>
<br>
</$list>
</$vars>
</$vars>
</$list>


You could use the regex operator to also get backlinks for links that use the | syntax or camel case.

Soren Bjornstad

unread,
Apr 8, 2021, 9:54:32 PM4/8/21
to TiddlyWiki
Thanks for the tips, and for the submitted feature request! Since in this case I know what plugin tiddler the backlinks will be coming from, I was able to hack together a version that comes at the links from the other direction, which presumably isn't terribly performant but seems to work all right:

[[$:/plugins/sobjornstad/GrokTiddlyWiki]plugintiddlers[]] :filter[links[]match<currentTiddler>] [all[current]backlinks[]]

Since the backlinks aren't visible until you click an expand button, I don't think the performance hit will be noticeable.

Mohammad Rahmani

unread,
Apr 9, 2021, 12:27:33 AM4/9/21
to tiddl...@googlegroups.com
Here Soren likes to distribute a book using plugin. There were other requests to have a plugin subtype or similar mechanism to
distribute presentations, lecture notes, etc..
 
and the current request, a plugin subtype or a simple mechanism to distribute materials in similar form and yet have the flexibility
of non shadow tiddlers (like backlinks, simple semantic name instead of $:/..../name) could of a requested feature in TW 5.1.24


Best wishes
Mohammad


Reply all
Reply to author
Forward
0 new messages