Skip to content

Gallery zoom opens image in new tab instead of lightbox when used within a non-Homepage widget #2245

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

Closed
danikiev opened this issue Apr 4, 2021 · 5 comments

Comments

@danikiev
Copy link

danikiev commented Apr 4, 2021

Description

The gallery shortcode does not work properly (does not open an image in slideshow) when used in a page bundle that belongs to a page with headless: false
However, it works inside home, which is headless.

How to reproduce

  • Clone starter-academic and change to the newly created directory
  • Update modules
hugo mod clean
hugo mod get -u ./...
hugo mod tidy
  • Create folder content/page
  • Copy gallery folder from exampleSite/content/home/gallery to content/page/gallery
  • Create file content/page/index.md with the following content:
---
type: widget_page
headless: false
---
  • Start server: hugo server
  • Open page //localhost:1313/page/

Expected behavior

The gallery shows up, but the images are not opened in a slideshow.

Instead, the clicked image is shown, e.g.:
//localhost:1313/page/gallery/gallery/theme-1950s.png

image

Technical details:

  • Wowchemy Version: v0.0.0-20210324194200-fda9f39d872e
  • Hugo Version: v0.82.0-9D960784+extended
  • Browser/OS: 'Firefox/Windows 10'
  • Wowchemy Template: Academic
@ericardomuten
Copy link

I also got the same issue. Would love to hear if there is a workaround or a fix for this.

@furyfire
Copy link
Contributor

furyfire commented May 2, 2021

Tracked it down to this commit.
dc09534

@gcushen
Copy link
Collaborator

gcushen commented May 29, 2021

The issue appears to be due to a limitation of Hugo's .HasShortcode not parsing the child pages (widgets). So with the current setup, it's not fully detecting usage of the Gallery shortcode.

@gcushen gcushen changed the title Gallery works improperly in page bundles of non-headless page Gallery zoom opens image in new tab instead of lightbox when used within a non-Homepage widget May 29, 2021
@Isoris
Copy link

Isoris commented May 29, 2021

I spent the last 2 days looking for a solution to the problem >.<, also could you please reupload this page:
https://wowchemy.com/docs/writing-markdown-latex/#image-gallery

@danikiev
Copy link
Author

danikiev commented Jun 1, 2021

Thanks , works nicely!

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

No branches or pull requests

5 participants