Open timotheos-firestone opened 4 years ago
That's because the renderer assumes it's a colocated asset, therefore nested in the folder and prefix the page path. This is not really supported but the link should not be invalid.
It is confusing that valid links in the source do not map to valid links on the output because of this issue. It seems that forcing the colocation asset assumption causes this issue. I really like #840 as a solution option for people not manually creating /folder/index.md; because with "ugly urls", both the output file and the relative links inside the file work as expected. In particular it is easier to have 2 files in the same folder sharing the same asset, rather than either having assets being fully "public" in the statics folder, or associated with a single file
It's actually a bug imo, we should not copy such a file in the public directory. You cannot share the assets, you will have to copy it once per .md file in that folder
Bug Report
Directory structure:
_index.md
page.md
sanctuary-map.jpg
page.md
includes the following Markdown:![Map of Sanctuary](sanctuary-map.jpg)
On using
zola serve
, the HTML output for this becomes:Expected HTML output:
Surely I would manually specify
![Map of Sanctuary](page/sanctuary-map.jpg)
if I wanted that behaviour?I took a look on the documentation and I couldn't find this current behaviour documented in the content overview.
It also doesn't generate any warnings that the image couldn't be found.
There's no documentation on how to reference an image that's within the same folder as the
page.md
, that I could see?Environment
Zola version: 0.9.0