hugo-easy-gallery icon indicating copy to clipboard operation
hugo-easy-gallery copied to clipboard

allow dots in thumb path or filename

Open it-gro opened this issue 7 years ago • 3 comments

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!

it-gro avatar Jan 10 '18 12:01 it-gro

Thanks @it-gro, I'll review this asap.

liwenyip avatar Jan 10 '18 21:01 liwenyip

Same issue here. I just came here to report it.

Edit: @it-gro's solution works great. Thanks.

HunterGraubard avatar Apr 13 '18 03:04 HunterGraubard

@it-gro and @HunterGraubard sorry that "asap" has turned into 12 months. Having a look now.

liwenyip avatar Apr 22 '19 04:04 liwenyip