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

Multiple galleries on one page #70

Closed
neilcharles opened this issue Feb 17, 2024 · 3 comments
Closed

Multiple galleries on one page #70

neilcharles opened this issue Feb 17, 2024 · 3 comments

Comments

@neilcharles
Copy link

The galleries are beautiful but I'm having an issue when I try to add two of them on the same page.

I'm using page bundles and have installed hugo-shortcode-gallery via git in my themes folder. I'm loading jquery with galleryLoadJQuery = true in hugo.toml. My content is structured like this:

  • content
    • posts
      • firstpost
        • index.md
        • gallery1
          • image1.jpg
          • image2.jpg
        • gallery2
          • image3.jpg
          • image4.jpg

I have two lines in index.md
{{< gallery match="gallery1/*" sortOrder="desc" rowHeight="150" margins="5" thumbnailResizeOptions="600x600 q90 Lanczos" showExif=true previewType="blur" embedPreview=true >}}

{{< gallery match="gallery2/*" sortOrder="desc" rowHeight="150" margins="5" thumbnailResizeOptions="600x600 q90 Lanczos" showExif=true previewType="blur" embedPreview=true >}}

Either line works fine on its own but when they're both present, the second gallery doesn't display and its pictures appear in the first gallery (but not the thumbnails, only when you page through the lightbox).

Adding the second line also causes an error in the console: Uncaught Error: jQuery is not loaded, hugo-shortcode-gallery wont work without it!

@neilcharles
Copy link
Author

Quick update to say it looks like the latest commit caused this problem. I noticed the jQuery error I was seeing was introduced in the latest update and 8fbc102 works fine. Thanks for the theme! I've rolled back for the moment and it's working perfectly :)

@dholbach
Copy link
Contributor

I'm seeing the same issue.

@mfg92
Copy link
Owner

mfg92 commented Feb 25, 2024

Thank you for reporting the bug and identifying the problematic commit.
The issue has been resolved with the latest release v1.1.1.

@mfg92 mfg92 closed this as completed Feb 25, 2024
alexvanderberkel pushed a commit to alexvanderberkel/hugo-shortcode-gallery that referenced this issue Aug 22, 2024
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