I built myself a section template that kind of works like a gallery. It iterates all pages from that section and shows their content. The child pages consist mainly of a picture (colocated with the page, no resize operation or anything) and a short comment.
These pictures are shown correctly on the page itself, but in the section they are broken because the relative path from the page is used (the subdirectory is missing). In the asset array however the correct/complete path to the image is available.
I donāt know when this broke for me, but it definitely used to work at some point. Did I miss a breaking change along the way or is this a bug? I could just use the asset variable instead of the page content, but I think if the user chooses to show the content on the parent section, the assets should be referenced correctly.
Iād appreciate any help or pointers related to this issue
Thanks, let me know if I can help or support you with something.
(Iām not familiar with the codebase yet, otherwise I would have jumped right in and try to locate the issue.)
Hm, this part was last changed in May 2019, which is before I even started using zola for my website. I briefly tried building that version anyways to verify but ran into all sorts of build errors, probably because a lot of crates have been yanked since then (and maybe toolchain incompabilities?).
All this made me curious enough though that I wanna have a look myself, now that I have a rough idea where to start looking. Iāll let you know if I find something.
$ git bisect good
4086b0755a84e82645de3f43aab7460a1a5da6d6 is the first bad commit
This is the commit which breaks it for me.
From what Iāve seen in the corresponding pull request and issue Iām not sure whether thatās intended or just a side effect. Maybe Tim can have a look at this? Iām linking this thread in the pull request discussion to ping him.
I am not sure if I introduced some bad practices or ācode smellā however and would like to get an opinion or suggestions for that. I also have broken at least one test, which I donāt understand yet how: