Add GitInfo
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 1 Nov 2016 22:04:12 +0000 (23:04 +0100)
committerGitHub <noreply@github.com>
Tue, 1 Nov 2016 22:04:12 +0000 (23:04 +0100)
commite8380e612fae18493556d620726a9069a17128db
treee7aa175227a5748a65b667734bb080a75a43d69e
parent186db7cd7ad56051d5a064ee5120e6ec73f575a0
Add GitInfo

This commit adds a `GitInfo` object to `Page` if `EnableGitInfo` is set.

It then also sets `Lastmod` for the given `Page` to the author date provided by Git.

The Git integrations should be fairly performant, but it adds "some time" to the build, somewhat depending on the Git history size.

If you want, you can run without during development and turn it on when deploying to the live server: `hugo --enableGitInfo`.

Fixes #2102
commands/hugo.go
docs/config.toml
docs/layouts/partials/footer.html
hugolib/config.go
hugolib/gitinfo.go [new file with mode: 0644]
hugolib/hugo_sites.go
hugolib/page.go
vendor/vendor.json