Using Vimwiki to embed images to a wiki that needs to be transferable between systems
Asked Answered
A

1

5

I am building an internal project wiki for a group software development project. The project wiki is currently powered by VimWiki and I send the HTML files to both the project supervisor and each of the development team on a weekly basis. This keeps our Intellectual property secure and internal, but also organized and up to date. I would like to put diagram images into the wiki itself so that all diagrams and documentation can be accessed together with ease. I am however having trouble making the images transferable between systems. Does vimwiki give a way for image files to be embedded such that they can be transferred between systems? Ideally the solution would make it possible to transfer the output directory of the Vimwiki as a singular entity containing the HTML files and the image files.

I have tried reading the documentation on images in the vimwiki reference document. I have not had luck using local: or file: variants. The wiki reference states that local should convert the image links to a localized location based on the output directory of the HTML files, but it breaks my image when I use it.

I have currently in my file

{{file:/images/picture.png}}

I expect the system to be able to transfer the file between computers but it registers to an absolute link and also does not include the image directory in the output directory of the vimwikiAll2HTML command.

Aleda answered 25/8, 2019 at 6:48 Comment(0)
M
6

I know this is an old question, but try to use {{local:/images/picture.png}} instead. If you open :help vimwiki in Vim, you can find a part that says:

In Vim, "file:" and "local:" behave the same, i.e. you can use them with both relative and absolute links. When converted to HTML, however, "file:" links will become absolute links, while "local:" links become relative to the HTML output directory. The latter can be useful if you copy your HTML files to another computer.

Marsipobranch answered 28/5, 2022 at 9:10 Comment(1)
Nice catch! I appreciate the answer.Aleda

© 2022 - 2024 — McMap. All rights reserved.