Skip to content
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

Open
ottlinger opened this issue Jul 20, 2024 · 5 comments
Open

Image sliders on main page not working anymore? #202

ottlinger opened this issue Jul 20, 2024 · 5 comments

Comments

@ottlinger
Copy link
Contributor

ottlinger commented Jul 20, 2024

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.

@ottlinger ottlinger changed the title Image sliders not working anymore Image sliders on main page not working anymore? Jul 20, 2024
@ottlinger
Copy link
Contributor Author

ottlinger commented Jul 20, 2024

The video background on the main page seems to be broken, too:
Trying to enable it by providing a custom partial stops rendering with

executing "partials/custom_header_video.html" at <$videoResource.RelPermalink>: nil pointer evaluating resource.Resource.RelPermalink

PS: I took the custom_header_video.html from the exampleSite's layout/partials folder.

@zjedi
Copy link
Owner

zjedi commented Jul 20, 2024

aye, we should prepare a github page with video cover, otherwise this get detected too late :/

@ottlinger
Copy link
Contributor Author

ottlinger commented Jul 20, 2024

Unfortunately no image is rendered on the main page anymore -
has the parameter/parameter names changed as well?

I had a look into the theme code and still saw:

  • header_image "/img/slide/slide01.jpg"

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
http://localhost:1313/img/slide/slide01.jpg but no markup is rendered containing any reference to the image.

@ottlinger
Copy link
Contributor Author

ottlinger commented Jul 20, 2024

I found a hacky workaround to get my background back ....

  • define a custom_header_video and enable video rendering in _index.md
  • remove all the permalink stuff (Go template part)
  • link to background image in video*s poster attribute
  • provide a link to a video via source that does not exist

Voila - the background is shown!

@FFMbyBicycle
Copy link

FFMbyBicycle commented Oct 4, 2024

Unfortunately no image is rendered on the main page anymore - has the parameter/parameter names changed as well?

I had a look into the theme code and still saw:

* header_image "/img/slide/slide01.jpg"

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 http://localhost:1313/img/slide/slide01.jpg but no markup is rendered containing any reference to the image.

I can reproduce this issue and found that commit 4191af6 introduced this behavior. You can test it yourself quite easily:

cd themes/hugo-scroll/
git checkout a1772f49e4491e1fce510fdd21e4f3b8ebf0294c
cd ../..
hugo

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants