Hi RA

> 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.

If you’re using _canonical_uri, then the SVGs would also need to be exposed via 
HTTP. You could put them in the “files” folder of the wiki:

https://tiddlywiki.com/#Using%20the%20integrated%20static%20file%20server

If you went that route you should be able to use `files/` as the prefix.

I’d be inclined to not bother with _canonical_uri, and instead embed the SVG 
text fields as shadow tiddlers.

Best wishes

Jeremy.

> 
> 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?>"}
>             }
>         }
>     ]
> }
> 
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/3fb7cd4b-7f02-4a96-b975-f909070de27f%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/3fb7cd4b-7f02-4a96-b975-f909070de27f%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2DD3009A-72DE-4928-9489-EFEA5A3750B6%40gmail.com.

Reply via email to