summaryrefslogtreecommitdiffstats
path: root/hugolib/config.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-11-01 23:04:12 +0100
committerGitHub <noreply@github.com>2016-11-01 23:04:12 +0100
commite8380e612fae18493556d620726a9069a17128db (patch)
treee7aa175227a5748a65b667734bb080a75a43d69e /hugolib/config.go
parent186db7cd7ad56051d5a064ee5120e6ec73f575a0 (diff)
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
Diffstat (limited to 'hugolib/config.go')
-rw-r--r--hugolib/config.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/hugolib/config.go b/hugolib/config.go
index 2dfe128a6..94477b75a 100644
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -106,4 +106,5 @@ func loadDefaultSettings() {
viper.SetDefault("defaultContentLanguage", "en")
viper.SetDefault("defaultContentLanguageInSubdir", false)
viper.SetDefault("enableMissingTranslationPlaceholders", false)
+ viper.SetDefault("enableGitInfo", false)
}