zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #03794
Re: Solved. (How to link icons within a zim book?)
Hi.
We have come up with this setting by convention now:
(Ubuntu 14.04, zim 0.60)
* Icons are available as a git managed, shared resource.
* convention, setting in every notebook.zim:
document_root=~/Notebooks/docroot
* symlink: docroot
~/Noteboooks/docroot symlinks to git managed shared external tree.
This way there are all freedoms needed (see below, example: Music).
And, the intentionally selected and agreed entry point "docroot"
will carefully not be filled up with any unrelated stuff.
* icons reside in:
~/Noteboooks/docroot/icons # or, following the symlink:
/some/external/real/tree/for/docroot/icons
* files, examples:
cd ~/Noteboooks/docroot
tree
.
├── icons
│ ├── led-green.gif
│ ├── led-red.gif
│ ├── led-yellow.gif
│ ├── tux.png
│ └── Warning.1.svg
└── Music -> /tmp/Music/
* example link to some icon:
/icons/led-blue.gif
{{/icons/led-blue.gif}}
* There also is place for other shared material as templates, videos or.
Think about link to music via blue led symbol:
{{/icons/led-blue.gif?href=/Music/A_flow_of_Tranquil.flac&width=20}}
* Such symbols may be copied and pasted within a zim book to different
levels as needed. They never break because tey are absolute links
related to a given document_root OUT_SIDE of the zim book itself.
* That last note is important. There is no such thing as an absolute link
within a zim book, they all are transformed into relative links
auto-magically by zim.
Thanks, zim is great!
Andreas
References