hugo-easy-gallery
hugo-easy-gallery copied to clipboard
allow dots in thumb path or filename
Thx for hugo-easy-gallery! Awesome!
I fixed an issue with the shortcodes (figure.html, gallery.html) When a path or filename includes dot(s) a wrong thumb filename is assumed.
static/
├── css
│ └── hugo-easy-gallery.css
├── img
│ ├── gohugo.io
│ │ ├── hugo.ipsum.png
│ │ └── hugo.ipsum-thumb.png
│ ├── hugo-dolor.png
│ ├── hugo-dolor-thumb.png
│ ├── hugo.lorem.png
│ └── hugo.lorem-thumb.png
└── js
└── load-photoswipe.js
e.g. {{< figure thumb="-thumb" link="/img/hugo.lorem.png" size="400x400" >}} gives: <img itemprop="thumbnail" src="/img/hugo-thumb.lorem-thumb.png" instead of <img itemprop="thumbnail" src="/img/hugo.lorem-thumb.png"
Test site is here: https://github.com/it-gro/HugoTestingHegDotIssue (using blank as theme)
I untabified gallery.html as well - but commited separately.
Thx again!
Thanks @it-gro, I'll review this asap.
Same issue here. I just came here to report it.
Edit: @it-gro's solution works great. Thanks.
@it-gro and @HunterGraubard sorry that "asap" has turned into 12 months. Having a look now.