mfg92 / hugo-shortcode-gallery

A theme component with a gallery shortcode for the static site generator hugo.
MIT License
359 stars 66 forks source link

match parameter ignored #59

Closed sebasrp closed 1 year ago

sebasrp commented 1 year ago

Hi, I'm trying to use the match pattern parameter to only display a subset of the images in a gallery (I want to put a gallery per section of my post).

File structure:

website/ ├─ content/ │ ├─ posts/ │ │ ├─ my sample post/ │ │ │ ├─ images/ │ │ │ │ ├─ prefixA-file1.jpg │ │ │ │ ├─ prefixA-file2.jpg │ │ │ │ ├─ prefixA-file3.jpg │ │ │ │ ├─ prefixB-file1.jpg │ │ │ │ ├─ prefixB-file2.jpg │ │ │ ├─ index.md

Gallery code used (copied sample) {{< gallery match="images/prefixA*" sortOrder="desc" rowHeight="150" margins="5" thumbnailResizeOptions="600x600 q90 Lanczos" previewType="blur" embedPreview=true loadJQuery=true >}}

I was expecting the gallery to only display the images starting with "prefixA", but it displays all images in the images folder. Trying different patterns, it seems that irrespective what i put in the match param, all images are selected (even if providing an invalid match pattern) Patterns tried:

How do i correctly use the match parameter?

sebasrp commented 1 year ago

Sorry - discard this issue. it was a clash between shortcodes that had the same name.