-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Open
Labels
Milestone
Description
In have a in-progress Hugo branch that with the demo site in https://github.com/bep/hugo-testing-git-versions gives a convincing demonstration of:
- The same content repo mounted with different Git versions.
.Page.GitInfoshows the correct commit info for these.
I'm going to try to wrap up that implementation in the near future, but that got me thinking about issues with the current API:
- It's
Pagesonly; there's currently no way to print that info about e.g. an image. - It's ... Git only.
I'm not so sure about the second one. But we may get us some future proofing by naming the package vcs.
With the above you would instead of:
{{ with .GitInfo }}
Subject: {{ .Subject }}
{{ end }}Write:
{{ with vcs.GetInfo . }}
Subject: {{ .Subject }}
{{ end }}And that would work for any* resource that's backed by a ... vcs.
- the definition of any is a little vague at the moment, but ... most.
Reactions are currently unavailable