liwenyip / hugo-easy-gallery

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

Attempts to use `attrlink` in Figure shortcode breaks Hugo #56

Open mgibson323 opened 4 years ago

mgibson323 commented 4 years ago

When I try to implement the Hugo Easy Gallery on my personal site, Hugo refuses to build when the {{< figure >}} stanza contains the attrlink parameter.

The build fails with the following error:

ERROR 2020/04/07 16:53:42 "/Users/mgibson323/work/redacted.com/content/about.md:8:1": 
failed to render shortcode "figure": failed to process shortcode: 
"/Users/mgibson323/work/redacted.com/layouts/shortcodes/figure.html:23:53": 
execute of template failed: template: shortcodes/figure.html:23:53: executing 
"shortcodes/figure.html" at <.Get>: can't evaluate field Get in type string

Example code follows:

about.md:

{{< load-photoswipe >}}
{{< figure src="/images/me.jpg" attr="image courtesy of @someuser" attrlink="https://twitter.com/someuser" >}}

figure.html:

Unchanged from master.

mgibson323 commented 4 years ago

18 seems to address this, but has been open for 2 years.

liwenyip commented 4 years ago

Hi @mgibson323

thanks for raising these issues. Unfortunately I currently don't have time to deal with pull requests. Are you interested in helping to maintain this project? (i.e. review and approve pull requests)

Cheers

mgibson323 commented 4 years ago

@liwenyip I'm not really technical enough to be much help, I'm afraid! 😅

liwenyip commented 4 years ago

Neither am I, that's why I'm looking for someone to help 😅

On Thu., 9 Apr. 2020, 09:14 Michael Gibson, notifications@github.com wrote:

@liwenyip https://github.com/liwenyip I'm not really technical enough to be much help, I'm afraid! 😅

— 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/56#issuecomment-611240984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5RSSQCPF2XPVDPBNLEYCLRLUALTANCNFSM4MDQYYPQ .