I’ve just discovered Hugo supports Git variables and I thought of adding some into a partial (footer), you can see the tentative code here:
https://github.com/shaftoe/curriculum-vitae/blob/footer/layouts/partials/footer.html
Unfortunately on my macOs v10.14.6 workstation with Hugo v0.63.2 doesn’t work despite all the requirements seems to be satisfied:
-
.git
is in the Hugo root folder - git executable is definitely in my
PATH
, I use it all the time - feature enabled in config.toml
When I try to access .GitInfo
inside a template with {{ .GitInfo.<any var> }}
it returns <nil>
:
executing "partials/footer.html" at <.GitInfo.AbbreviatedHash>: nil pointer evaluating *gitmap.GitInfo.AbbreviatedHash
Ideas?
Thanks
–
Alex