liwenyip/hugo-easy-gallery

Multiple galleries on post do not work

Closed this issue · 3 comments

For some reason when I include more than one gallery shortcode on a single post all I get is this:

image

Note: The whole post is this:

This is a test

{{< gallery dir="/wp-content/galleries/2013-08-26-automatic-cat-lasers/1/">}}
{{< gallery dir="/wp-content/galleries/2016-06-21-rfitea-tea-steeping-with-rfid/1/">}}

And it's only showing the first one. When looking at the page source, it does not include /css/hugo-easy-gallery.css if I add more than one gallery shortcode. The 2 about the image is actually from me adding this right above the first <div> in the gallery shortcode:

{{ $.Page.Scratch.Get "figurecount" }}

So it seems like it's counting both. But completely falls apart otherwise.

Thoughts?

Ah... nevermind. I wasn't closing my shortcodes with / at the end :(

@adammhaile were you using photoswipe in your example? I have a similar setup and when using photoswipe, both galleries are "combind", i.e. in the photoswipe's lightbox I would automatically transition from the last image of the first gallery to the first image of the second gallery when hitting the next button.