liwenyip / hugo-easy-gallery

Automagical css image gallery in Hugo using shortcodes, with optional lightbox/carousel gadget using PhotoSwipe and jQuery.
MIT License
576 stars 111 forks source link

Multiple galleries on post do not work #28

Closed adammhaile closed 6 years ago

adammhaile commented 6 years ago

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?

adammhaile commented 6 years ago

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

tkothe commented 5 years ago

@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.

adammhaile commented 5 years ago

Yes

On Sat, Dec 15, 2018, 5:21 AM Till Kothe <notifications@github.com wrote:

@adammhaile https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/liwenyip/hugo-easy-gallery/issues/28#issuecomment-447557396, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6a6jSeBCE2Z2RlHD3dYqkXHs4pGupEks5u5M0lgaJpZM4Udc84 .