A way of creating Wikipedia article links

117 views
Skip to first unread message

Charlie Veniot

unread,
Jan 3, 2022, 6:17:34 PM1/3/22
to TiddlyWiki
(Because I find myself referring to many articles in a TiddlyWiki instance.)

Transclusion goodness:

{{Primitive_data_type||tWm}}

So passing the (Wikipedia, mobile) article part of the URL to the tiddler template "tWm".

There is no tiddler named "Primitive_data_type".  This is just a way to give "tWm" some text.

The "tWm" tiddler text:

^^<a href={{{ [[https://en.m.wikipedia.org/wiki/]addsuffix<currentTiddler>] }}} style="text-decoration:none;font-family:Times New Roman" target="_blank">W</a>^^

Same kind of thing could be done with a macro if you prefer macros.

Charlie Veniot

unread,
Jan 30, 2023, 5:42:28 PM1/30/23
to TiddlyWiki
I was going to create a post about this and totally forgot that I had already done that.

Here is the "tWm" template tiddler, which I've modified just a little bit to show a tooltip:

Drag attached to tiddlywiki.com .

For any Wikipedia article, you just want the part of the url that has the article name, so for

```https://en.wikipedia.org/wiki/Primitive_data_type```, you'll setup the transclusion as ```{{Primitive_data_type||tWm}}```

tWm.json

Charlie Veniot

unread,
Jul 5, 2023, 10:32:22 PM7/5/23
to TiddlyWiki
I've since added a second kind of Wikipedia link to handle the two ways I use them.

Two template tiddlers in the attached file.

Usage example:

Screenshot 2023-07-05 11.29.54 PM.png

WikipediaLinksTiddlerTemplates.json

Charlie Veniot

unread,
Jul 5, 2023, 11:35:07 PM7/5/23
to TiddlyWiki
And then, for the giggles:

Screenshot 2023-07-06 12.33.05 AM.png

Reply all
Reply to author
Forward
0 new messages