Git Info Variables
- The Hugo site must be in a Git-enabled directory.
- The Git executable must be installed and in your system
.GitInfofeature must be enabled in your Hugo project by passing
--enableGitInfoflag on the command line or by setting
truein your site’s configuration file.
GitInfo object contains the following fields:
- the abbreviated commit hash (e.g.,
- the author’s name, respecting
- the author’s email address, respecting
- the author date
- the commit hash (e.g.,
- commit message subject (e.g.,
tpl: Add custom index function)
.GitInfo feature is enabled,
Page) is fetched from Git i.e.
.GitInfo.AuthorDate. This behavior can be changed by adding your own front matter configuration for dates.