HUGO

Hugo Easy Gallery - features/parameters of figure shortcode not working

Hi, my Easy Gallery shortcode works fairly well, but on the modal images only the caption text appears. I have found through testing that other the figure features/parameters such as title and attr that are supposed to work in Hugo’s figure shortcode, don’t. I especially need to have a linked credit under the image - attr and attrlink. Also, alt text replaces the caption text. Can anyone help me please?

A copy of the website (very much still under development) is here: https://github.com/Corhynia/Hugo-Girraween/tree/master The gallery in question can be found at the bottom of the About Us page under the Resources tab on the navigation bar. The first image in the gallery has the codes in it.

I’ve managed to solve the problem by putting the credits with their links in the Alt text. Not the best way of doing it, but it works.

Not sure if this is the same problem, but in case it helps anyone: I was getting an error that said <.Get>: can't evaluate field Get in type string so I changed in shortcodes/figure.html:

            {{- with .Get "attrlink"}}<a href="{{.}}">{{ .Get "attr" }}</a>{{ else }}{{ .Get "attr"}}{{ end -}}

to:

            {{- $attr := .Get "attr" }}
            {{- with .Get "attrlink"}}<a href="{{.}}">{{ $attr }}</a>{{ else }}{{ $attr }}{{ end -}}

And that solved the problem.