diff options
Diffstat (limited to 'docs/content/en/methods/page/GitInfo.md')
-rw-r--r-- | docs/content/en/methods/page/GitInfo.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/content/en/methods/page/GitInfo.md b/docs/content/en/methods/page/GitInfo.md index 5fde05b07..90dc3870a 100644 --- a/docs/content/en/methods/page/GitInfo.md +++ b/docs/content/en/methods/page/GitInfo.md @@ -117,6 +117,22 @@ hugo --enableGitInfo {{ end }} ``` +### Ancestors + +(`*source.GitInfo`) The file-filtered ancestor commits, if any. + +```go-html-template +{{ with .GitInfo }} + {{ range .Ancestors | first 5 }} + {{ .CommitDate.Format "2006-01-02" }}: {{ .Subject }} + {{ end }} +{{ end }} +``` + +### Parent + +(`*source.GitInfo`) The first file-filtered ancestor commit, if any. + ## Last modified date By default, when `enableGitInfo` is `true`, the `Lastmod` method on a `Page` object returns the Git AuthorDate of the last commit that included the file. |