docs: Add Extras > GitInfo - hugo - [fork] hugo port for 9front
(HTM) git clone git@git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit aecabfcd4f20fa834794e3d317844a0b61548fb6
(DIR) parent ef03c6f95412494902aef40335d8666136fad558
(HTM) Author: Cameron Moore <moorereason@gmail.com>
Date: Sun, 11 Dec 2016 18:40:45 -0600
docs: Add Extras > GitInfo
Fixes #2670
Diffstat:
A docs/content/extras/gitinfo.md | 48 +++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/docs/content/extras/gitinfo.md b/docs/content/extras/gitinfo.md
@@ -0,0 +1,48 @@
+---
+aliases:
+- /doc/gitinfo/
+lastmod: 2016-12-11
+date: 2016-12-11
+menu:
+ main:
+ parent: extras
+next: /extras/livereload
+prev: /extras/datadrivencontent
+title: GitInfo
+---
+
+Hugo provides a way to integrate Git data into your site.
+
+
+## Prerequisites
+
+1. The Hugo site must be in a Git-enabled directory.
+1. The Git executable must be installed and in your system `PATH`.
+
+## The GitInfo Object
+
+The `GitInfo` object contains the following fields:
+
+AbbreviatedHash
+: abbreviated commit hash, e.g. `866cbcc`
+
+AuthorName
+: author name, respecting `.mailmap`
+
+AuthorEmail
+: author email address, respecting `.mailmap`
+
+AuthorDate
+: the author date
+
+Hash
+: commit hash, e.g. `866cbccdab588b9908887ffd3b4f2667e94090c3`
+
+Subject
+: commit message subject, e.g. `tpl: Add custom index function`
+
+
+## Performance Considerations
+
+The Git integrations should be fairly performant, but it does add some time to the build, which depends somewhat on the Git history size.
+