You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PaperMod provides a layouts/_default/_markup/render-image.html render hook.
However, in newer versions of Hugo (0.123 and beyond) a new embedded image render hook is also provided. I think this may be meant as a better way to manage resources in a multilingual setup, but I also found it useful to avoid canonifyURL in cases where the entire site/baseURL is not at the root (i.e. like in www.xxx.yyy/zzz).
The embedded image render hook needs to be manually enabled for some sites, but is automatically enabled for multilingual single-host sites in the default configuration.
It may not be obvious (when debugging) why the embedded image render hook is not accessible when the embedded link render hook works with PaperMod -- at least it took me some minutes to figure out why not all url's were rewritten correctly.
I'm wondering to which degree the render-image.html hook in PaperMod is needed, or if it could be made to work with the embedded image render hook when enabled somehow -- although I don't currently see a good solution for that? I guess it's mainly there to provide the alt text?
In my own site, I simply made the embedded image render hook explicit by replacing (and updating) the render-image.html file with the code of the embedded one.
The text was updated successfully, but these errors were encountered:
...page resources for non-default languages on a multilingual single-host site will not be found.
The only thing that the existing image render hook does is to add a lazy loading attribute. Either model the hook after Hugo's embedded hook, or remove it.
PaperMod provides a layouts/_default/_markup/render-image.html render hook.
However, in newer versions of Hugo (0.123 and beyond) a new embedded image render hook is also provided. I think this may be meant as a better way to manage resources in a multilingual setup, but I also found it useful to avoid canonifyURL in cases where the entire site/baseURL is not at the root (i.e. like in www.xxx.yyy/zzz).
The embedded image render hook needs to be manually enabled for some sites, but is automatically enabled for multilingual single-host sites in the default configuration.
It may not be obvious (when debugging) why the embedded image render hook is not accessible when the embedded link render hook works with PaperMod -- at least it took me some minutes to figure out why not all url's were rewritten correctly.
I'm wondering to which degree the render-image.html hook in PaperMod is needed, or if it could be made to work with the embedded image render hook when enabled somehow -- although I don't currently see a good solution for that? I guess it's mainly there to provide the alt text?
In my own site, I simply made the embedded image render hook explicit by replacing (and updating) the render-image.html file with the code of the embedded one.
The text was updated successfully, but these errors were encountered: