Add GitInfo to Posts

Add this snipper to your theme’s single.html file:

 {{ if $.GitInfo }}
 <!-- To enable this, put "enableGitInfo = true" in your site config.toml -->
    {{ .GitInfo.AbbreviatedHash }}
{{ end }}

Make sure you enable GitInfo in your site configuration too. This conditional snippet will not throw compilation errors, but neither will it show anything without it.

November 11, 2019   (v.93b1882)