But when I try to add some .GitInfo.xxx, .GitInfo is out of the scope of the shortcode. (OK elsewhere)
I tried to pass some context to the shortcode, but without success. Couldn’t find either a hint on discourse or google. I guess it is go template related but I’m puzzled.
Any hint/tip ?
{{ range first $nombre_md (sort .Site.RegularPages.ByLastmod ".Lastmod" "desc") }}
{{.Lastmod.Format "Jan, 02 2006"}} => OK
{{ .Permalink }}" => OK
{{ .Title }} => OK
{{ $url }} => OK
{{ .GitInfo }} => can't succed to have .GitInfo It is <nil>
{{ end }}
Shortcodes have access to parameters delimited in the shortcode declaration via .Get, page- and site-level variables, and also the following shortcode-specific fields
So a shortcode has no access to .File, .Hugo, .Menu, .GitInfo, .Sitemap variables …
I tried to pass some context to the shortcode
You can only pass strings as parameters…