Trying to add FontAwesome as a plugin. The wiki is working, the
plugin is recognized, and it contains shadow tiddlers for each svg file.
The only part I cannot get right is the _canonical_uri, so I get a
"broken image" icon in each shadow tiddler instead of an svg image.
The documentation says "The URI can be absolute or relative to the HTML document."
What
is the location of "HTML document" in case of Node.js? Is it where
tiddlywiki.js is, or where
tiddlywiki.info is? Or the current path in
the shell where I'm launching the nodejs command from?
What
should I set the prefix to? Is it even possible for _canonical_uri to
point to a relative path that is outside the "HTML document"?
My wiki URL is
http://<ip address>:<port>/work
The tiddlywiki command:
nodejs /srv/TiddlyWiki5/app/tiddlywiki ++/srv/TiddlyWiki5/plugins/fontawesome /srv/TiddlyWiki5/wikis/work --listen host=0.0.0.0 port=8083 'root-tiddler=$:/core/save/lazy-all' 'path-prefix=/work'
Filesystem structure:
/srv/TiddlyWiki5/
app/tiddlywiki.js
plugins/fontawesome/tiddlywiki.files
plugins/fontawesome/svgs/regular/*.svg
wikis/work/tiddlywiki.info
wikis/work/tiddlers/*.tid
tiddlywiki.files (cannot get the prefix right):
{
"directories": [
{
"path": "svgs/regular",
"filesRegExp": "^.*\\.svg$",
"isTiddlerFile": false,
"fields": {
"title": {"source": "basename-uri-decoded"},
"created": {"source": "created"},
"modified": {"source": "modified"},
"type": "image/svg+xml",
"_canonical_uri": {"source": "filename", "prefix": "<what should I put here?>"}
}
}
]
}