mfg92/hugo-shortcode-gallery

using the "print" feature from docsy combines several pages but only the galleries from the first page are visible

Closed this issue · 13 comments

Hi,

I use hugo-shortcode-gallery together with the docsy theme.
The docsy theme allows to generate a print preview of sections -- this basically combines several pages to a bigger printable page.
In the resulting "bigger" page only galleries from the first page are visible.
Galleries from further pages are not visible but after inspection of the html they're correctly included.
If I inspect those "invisible" galleries, the images appear with size 0x0.

Unfortunately the affected site is not public yet so I can't really share an example.

Any ideas? could this be related somehow to resizing of images which is only applied to part of the images?

mfg92 commented

Are you using the lazy loading functionality of
hugo-shortcode-gallery ?

I don't know.

I'm using this config

gallerySortOrder: "asc"
galleryRowHeight: "250"
galleryRowMargins: "5"
galleryResizeOptions: "600x600 q90 Lanczos"
galleryShowExif: false
galleryPreviewType: "none"
galleryEmbedPreview: "false"
galleryThumbnailHoverEffect: "none"
galleryLastRow: "nojustify"

mfg92 commented

And how are you embedding the galleries in the markdown file?

just very simple like this
{{< gallery match="mediadir/*" >}}

mfg92 commented

@think-nice-things is this still an issue? If so, can you share a minimal working example (e.g. as a zip file)?

it's still an issue. I'll try to prepare an example in the next days.

@mfg92: I think I'm seeing the same thing @think-nice-things is seeing here. I can see it on my website https://www.scottyob.com/

Here on the front page, "Hydroponic Kratky Lettuce Attempts" has two galleries shown, "Custom Study Desk" rendered right underneath has none.

You can pull down https://github.com/scottyob/website to recreate locally.

mfg92 commented

@scottyob How do I open that problematic print preview on your website?

@mfg92: I'll be honest, I don't know what print preview is, but it looks like the same symptoms.

Notice the root home page has a listing of multiple posts, the top two posts both have gallery, but only "Hydroponic Kratky Lettuce Attempts" is displaying them.
image

Clicking on the title and viewing the single custom desk page does render the gallery here correctly though.
image

mfg92 commented

I have found the the cause of this issue. I made a fix here #31. Can you check out that branch an report if it solves your problem?

Works like a charm

image

@mfg92: Is there some way I shout you a beer or coffee, mate? Thanks for the fix

mfg92 commented

You're welcome!