-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update render-image.html to fix dimbox in List View #636
Conversation
Updated the render-image render hook based on the official HUGO embedded render image hook so it works in the List View when noSummary is enabled in the post's front matter.
This code could still be improved by adding image processing, srcset support and lazyloading. I'm trying to do so but I get errors when I try to serve. Will keep on trying and I'll do a new pull request if I manage to add these additional features. |
@Sp-cy, I'm not able to test this PR with the Bilberry Sandbox because of a failing build: igor-baiborodine/bilberry-hugo-theme-sandbox#47. When trying to test in my local dev I'm having the same issue. |
I'm currently using the PR render hook in my site without issues in the preview server nor the site building 🤷🏻♂️😓. My current HUGO version is as follows:
I checked the opengraph internal template to see if something in the PR could be interfering with the template and I can't locate any possible conflicts but I'm not an expert in HUGO, maybe someone else could help us out with this. |
Sandbox cannot be built even on the master branch, and seems due to the line: Backing some commits doesn't change the situation, so I believe that this comes from the change of behavior of Hugo. |
I guess it's pertinent to point out that this PR also enables the usage of Global Image Resources that allows for Image processing with images that aren't placed in a Page Bundle. I think this is great because we are no longer obligated to make a folder for posts with images. As per HUGO's documentation on Global Image Resources , Images can be placed within the assets directory, or within any directory mounted to the assets directory. l just tested this and it's working on my end. I personally don't love having so much |
@Sp-cy, could you please sync your fork with the latest release from the origin? I had to make some updates to the theme since the minimum Hugo version required for this fix is |
🫡 Done. |
@Sp-cy, thanks for your contribution! |
Fix for #635
Updated the render-image render hook based on the official HUGO embedded render image hook so it works in the List View when noSummary is enabled in the post's front matter. It could be simpler but I tried to keep it as close to the official HUGO embedded Image render hook and the current theme's Dimbox implementation.
From what I saw, HUGO updated the included Image render hook to resolve this type of situations not long (some weeks?) ago.
It's currently working on my end but some further testing is advised.
References