-
In the issue #570 you stated that the issue with the images was not a real problem and you give a quote about the leaf bundles. Thus, I wonder if the branches bundles are supported by this theme.
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Should work with #81. |
Beta Was this translation helpful? Give feedback.
-
No, I can't make it work. I tried with My folder is structure is like this:
Inside article1.md, I insert my image:
When I am trying to load the post, the image can't be loaded. Its path is http://localhost:1313/image1.png My tests on the cover image shows that if I am renaming the index.md file, the image cannot be loaded anymore. |
Beta Was this translation helpful? Give feedback.
-
In order to use page resources (images), the markdown file has to be named
https://gohugo.io/content-management/page-bundles/#leaf-bundles |
Beta Was this translation helpful? Give feedback.
-
You can have many nested branch bundles as you like. But in order to access a page resource (image), the file has to be called |
Beta Was this translation helpful? Give feedback.
-
I first came here because I migrate from hugo-clarity where everything was working fine (I was able to include an image in others file than index.md). |
Beta Was this translation helpful? Give feedback.
-
I just checked the code of that theme, and it uses some tricks to read the image outside the leaf bundle, not only I prefer to keep the thing as it is right now, just not to mess it up... |
Beta Was this translation helpful? Give feedback.
-
Ok thank you for your time. Didn't know they use tricks. |
Beta Was this translation helpful? Give feedback.
I just checked the code of that theme, and it uses some tricks to read the image outside the leaf bundle, not only
.Page.Resources.GetMatch
which is what I use in this theme.https://github.com/chipzoller/hugo-clarity/blob/e68a523254487da99652f94f99e23eb781f95330/layouts/_default/_markup/render-image.html#L35-L44
I prefer to keep the thing as it is right now, just not to mess it up...