Hello,
This is my first post because it’s the first time I find no clues at all on what’s going on.
I’m not sure what is happening. I’m designing two sites, each one is based on assets collocation, and in each one I have page with an image relative path (media/my-image.webp
) in the [extra]
frontmatter, this path is then used in the template like this <img src="{{ page.extra.img.src }}" alt="{{ page.extra.img.alt }}/>
But I don’t know why, there is one (the oldest) that have no problem understanding the path is relative and it is well displayed in my browser, and the other one seems to understand this path as an absolute one (as if there was a leading /
in the path).
I been using version 0.17.1 when designing both of them, but in my research I tested to serve both of them with the 0.19.1 binary, and the difference persists. One is working, the other not. And without any error message except GET http://127.0.0.1:1111/media/my-image.webp not found
in the browser console (which is normal because link should have been http://127.0.0.1:1111/my-page/media/my-image.webp
).
I don’t remember having anything to configure or having any trouble the first time to use collocated assets. Even in the documentation it seems quite straightforward, but this time I need to concatenate myself the page slug in order to get my assets.
And even with a trivial example (just <a href="test.txt">Test</a>
in the index.md
of a page) I can’t get to my test.txt…
I’m starting to run out of leads on the subject, do you have any idea about some configuration or some behaviour that I forgot ?
I’m sure I’m missing something, but I don’t know what…