I would like to create a documentation site that will take the docs directory from three different repos:
https://github.com/simpleiot/hardware/tree/master/docs
https://github.com/simpleiot/simpleiot/tree/master/docs
https://github.com/simpleiot/firmware/tree/master/docs
and have each one of these “docs” directory be a section in my zola generated site: hardware, application, and firmware.
The idea is that the documentation can live close to the source/projects where it will more likely get maintained and be easy to view in Github/text editor, or in the dedicated documentation site – it will just look a little prettier in the docs site. One reason this is important is you always have documentation with your source code that matches the version you are using – this is important for industrial products with long product life cycles.
Thus far, I’ve used the convention that images used in the docs simply live in the same directory as the markdown file. If I copy the hardware/docs
directory to the content/hardware
directory in my Zola project and have a relay-node.md
file that references an image, then Zola looks for the image at the following location:
http://127.0.0.1:1111/hardware/node-relay/node-relay.jpg
However, the original docs have the files arranged like so:
Looking through the zola examples, it seems one way to do this is to move the above two files to:
node-relay/index.md
node-relay/node-relay.jpg
I really like the fact that images can live in the same directory as markdown in Zola, vs having to be in a static/
directory or something like that – that is a huge improvement over other generators I’ve tried. However, is there any way to convince Zola to reference an image in the parent directory path if a markdown file is not index.md? Using the above example, I’d like Zola to generate the following link for the image:
http://127.0.0.1:1111/hardware/node-relay.jpg
Is there any way to make this work? Thanks!