hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 6017599a3c0160d3f4daad671c1d6b1df47a4b3e
parent ef595aedfce66caf2e8560b3605d38e95872e1ca
Author: spf13 <steve.francia@gmail.com>
Date:   Tue, 12 Nov 2013 09:38:43 -0500

restored behavior of respecting config values unless set by command flags. fixed #116

Diffstat:
Mcommands/hugo.go | 15++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/commands/hugo.go b/commands/hugo.go
@@ -71,9 +71,18 @@ func init() {
 
 func InitializeConfig() {
 	Config = hugolib.SetupConfig(&CfgFile, &Source)
-	Config.BuildDrafts = Draft
-	Config.UglyUrls = UglyUrls
-	Config.Verbose = Verbose
+
+	if HugoCmd.PersistentFlags().Lookup("build-drafts").Changed {
+		Config.BuildDrafts = Draft
+	}
+
+	if HugoCmd.PersistentFlags().Lookup("uglyurls").Changed {
+		Config.UglyUrls = UglyUrls
+	}
+
+	if HugoCmd.PersistentFlags().Lookup("verbose").Changed {
+		Config.Verbose = Verbose
+	}
 	if BaseUrl != "" {
 		Config.BaseUrl = BaseUrl
 	}