-
Notifications
You must be signed in to change notification settings - Fork 204
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
Image sliders on main page not working anymore? #202
Comments
The video background on the main page seems to be broken, too:
PS: I took the custom_header_video.html from the exampleSite's layout/partials folder. |
aye, we should prepare a github page with video cover, otherwise this get detected too late :/ |
Unfortunately no image is rendered on the main page anymore - I had a look into the theme code and still saw:
The referenced file is available under /public/img/slide but just not gets rendered/shown at all. The image itself can be rendered locally via |
I found a hacky workaround to get my background back ....
Voila - the background is shown! |
I can reproduce this issue and found that commit 4191af6 introduced this behavior. You can test it yourself quite easily:
a1772f4 is the commit before the multi language patch. Using 4191af6 or newer I'm unable to view the defined header_image, it's not referenced anywhere after generating the public pages. |
I am encountering this issue as well. Previous versions worked, header_image rendered. File
Navigating to
Using the instructions from @FFMbyBicycle to revert back to a last known good commit 4191af6 then viewing source provides the following:
This header element is not being rendered by subsequent releases. |
Additional investigation Previous version:
Current Version:
I note that my hugo.toml contains the line:
But I do not expect this to affect the render. It looks like layouts/index.html is where the issue may be. |
According to reported bug analysis, the problem originates from |
From a CSS point of view, the header tag still has the background-image like before. Just not defined through unsafe-inline but the style-Tag to also allow for different image sizes depending on screen size. For mobile phones this avoids downloading a big desktop version of the image. depending on the implementation of the image slider this might break, if I.e. not all media query images are changed for the sliding. Technically the desktop images might still be sliding but are just not displayed on smaller screens. ;-) To see which solution should be applied, I would would need an example site. |
Steps to reproduce the issue:
Add following details to hugo.toml:
Create home page
Add following details to content_index.md:
Copy over static assets:
Run server
Browsing to http://localhost:1313/ displays no background image: |
Note that this is tested in desktop mode using Firefox. The same result is obtained with Chrome and Edge. |
@instantdreams Is it problem only with local deployment? When you publish the site, is it ok? |
The issue can be reproduced locally and when deployed. The code generated is the same. For reference, image properties:
|
My workaround does not work with the latest version of the theme - no video is rendered anymore :( but a static image remains on the frontend page. Furthermore the footer/contacts icons are broken and do not get rendered anymore ..... |
Any update on this issue? |
I ran into this issue as well. I found that the function to fetch an image from global resources--resources.Get--does not look in the So I copied my images to the
I changed the prefix from After that, I ran the build once, then |
I recently upgraded to the latest version of hugo-scroll and my image slider on the index page stopped working.
Has that feature been removed? How can I configure multiple images on my start page.
The slider integration was based on a slide.json under the data directory.
At the moment no cover image/image at all is shown on the base index page.
The text was updated successfully, but these errors were encountered: