Please educate me on _canonical_uri paths

63 views
Skip to first unread message

Werner

unread,
Jul 31, 2020, 5:22:18 AM7/31/20
to TiddlyWiki
Good morning,

did some extensive research on it already, but seem too dumb to get it. Ok, here's the deal: Running TW on node.js and Windows 10. Did a normal NPM install, so tiddlywiki.cmd resides in C:\Users\<me>\AppData\Roaming\npm. OTOH, I have a wiki in C:\Users\de00735\OneDrive - Company\Biologics\_Wiki\Repository. That's the path where my tiddlywiki.info sits, unfortunately with two blanks in it.

I have a lot of png logos that, so far, I have imported using the regular import mechanism, i.e., in the tiddlers directory, it creates a tiddler, a tiddler.meta file and puts the associated.png into the directory too. So far so good.

I thought, for OCD reasons, it might be a good idea putting all the logos into a separate directory which I wanted to call "logos". Unfortunately, any attempt to enter a _canonical_uri pointing at that directory failed. I initially assumed the directory where tiddlywiki.info sits as the root directory giving the _canonical_uri path the value ./tiddlers/logos, but no avail. Other attempts, like using the TW install directory as root directory and pointing at the logos directory using ../../../OneDrive - (etc) also failed.

So, could any kind soul enlighten me on where I went wrong. Thanks so much in advance.

Saq Imtiaz

unread,
Jul 31, 2020, 5:37:12 AM7/31/20
to TiddlyWiki
You can set a canonical uri to any file path, but you also need a webserver to serve the static file at that file path.

TiddlyWiki on node has a built-in static file server that serves all static files located in the files folder in the wiki folder, that is parallel to the tiddlers folder:


So you could create a logos subfolder in the files folder.

Werner

unread,
Jul 31, 2020, 6:21:44 AM7/31/20
to TiddlyWiki
Saq,

that was quick. I actually read the link you gave, but obviously wasn't able to make sense of it. Works. Thanks. Problem solved.

Kind regards
Werner
Reply all
Reply to author
Forward
0 new messages