shithub: hugo

Download patch

ref: f21e2f25c99c547a2f35d209935f8f1c52fa2671
parent: d9f54a13c14f12ccc8af33e9dbd611c2cd113324
author: Albert Nigmatzianov <[email protected]>
date: Mon Oct 24 16:56:00 EDT 2016

all: Unify case of config variable names

All config variables starts with low-case and uses camelCase.

If there is abbreviation at the beginning of the name, the whole
abbreviation will be written in low-case.
If there is abbreviation at the end of the name, the
whole abbreviation will be written in upper-case.
For example, rssURI.

--- a/commands/convert.go
+++ b/commands/convert.go
@@ -134,7 +134,7 @@
 			metadata = newmetadata
 		}
 
-		page.SetDir(filepath.Join(helpers.AbsPathify(viper.GetString("ContentDir")), file.Dir()))
+		page.SetDir(filepath.Join(helpers.AbsPathify(viper.GetString("contentDir")), file.Dir()))
 		page.SetSourceContent(psr.Content())
 		if err = page.SetSourceMetaData(metadata, mark); err != nil {
 			jww.ERROR.Printf("Failed to set source metadata for file %q: %s. For more info see For more info see https://github.com/spf13/hugo/issues/2458", page.FullFilePath(), err)
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -117,7 +117,7 @@
 		}
 
 		if buildWatch {
-			viper.Set("DisableLiveReload", true)
+			viper.Set("disableLiveReload", true)
 			watchConfig()
 		}
 
@@ -284,55 +284,55 @@
 	for _, cmdV := range append([]*cobra.Command{hugoCmdV}, subCmdVs...) {
 
 		if flagChanged(cmdV.PersistentFlags(), "verbose") {
-			viper.Set("Verbose", verbose)
+			viper.Set("verbose", verbose)
 		}
 		if flagChanged(cmdV.PersistentFlags(), "logFile") {
-			viper.Set("LogFile", logFile)
+			viper.Set("logFile", logFile)
 		}
 		if flagChanged(cmdV.Flags(), "cleanDestinationDir") {
 			viper.Set("cleanDestinationDir", cleanDestination)
 		}
 		if flagChanged(cmdV.Flags(), "buildDrafts") {
-			viper.Set("BuildDrafts", draft)
+			viper.Set("buildDrafts", draft)
 		}
 		if flagChanged(cmdV.Flags(), "buildFuture") {
-			viper.Set("BuildFuture", future)
+			viper.Set("buildFuture", future)
 		}
 		if flagChanged(cmdV.Flags(), "buildExpired") {
-			viper.Set("BuildExpired", expired)
+			viper.Set("buildExpired", expired)
 		}
 		if flagChanged(cmdV.Flags(), "uglyURLs") {
-			viper.Set("UglyURLs", uglyURLs)
+			viper.Set("uglyURLs", uglyURLs)
 		}
 		if flagChanged(cmdV.Flags(), "canonifyURLs") {
-			viper.Set("CanonifyURLs", canonifyURLs)
+			viper.Set("canonifyURLs", canonifyURLs)
 		}
 		if flagChanged(cmdV.Flags(), "disable404") {
-			viper.Set("Disable404", disable404)
+			viper.Set("disable404", disable404)
 		}
 		if flagChanged(cmdV.Flags(), "disableRSS") {
-			viper.Set("DisableRSS", disableRSS)
+			viper.Set("disableRSS", disableRSS)
 		}
 		if flagChanged(cmdV.Flags(), "disableSitemap") {
-			viper.Set("DisableSitemap", disableSitemap)
+			viper.Set("disableSitemap", disableSitemap)
 		}
 		if flagChanged(cmdV.Flags(), "enableRobotsTXT") {
-			viper.Set("EnableRobotsTXT", enableRobotsTXT)
+			viper.Set("enableRobotsTXT", enableRobotsTXT)
 		}
 		if flagChanged(cmdV.Flags(), "pluralizeListTitles") {
-			viper.Set("PluralizeListTitles", pluralizeListTitles)
+			viper.Set("pluralizeListTitles", pluralizeListTitles)
 		}
 		if flagChanged(cmdV.Flags(), "preserveTaxonomyNames") {
-			viper.Set("PreserveTaxonomyNames", preserveTaxonomyNames)
+			viper.Set("preserveTaxonomyNames", preserveTaxonomyNames)
 		}
 		if flagChanged(cmdV.Flags(), "ignoreCache") {
-			viper.Set("IgnoreCache", ignoreCache)
+			viper.Set("ignoreCache", ignoreCache)
 		}
 		if flagChanged(cmdV.Flags(), "forceSyncStatic") {
-			viper.Set("ForceSyncStatic", forceSync)
+			viper.Set("forceSyncStatic", forceSync)
 		}
 		if flagChanged(cmdV.Flags(), "noTimes") {
-			viper.Set("NoTimes", noTimes)
+			viper.Set("noTimes", noTimes)
 		}
 
 	}
@@ -341,10 +341,10 @@
 		if !strings.HasSuffix(baseURL, "/") {
 			baseURL = baseURL + "/"
 		}
-		viper.Set("BaseURL", baseURL)
+		viper.Set("baseURL", baseURL)
 	}
 
-	if !viper.GetBool("RelativeURLs") && viper.GetString("BaseURL") == "" {
+	if !viper.GetBool("relativeURLs") && viper.GetString("baseURL") == "" {
 		jww.ERROR.Println("No 'baseurl' set in configuration or as a flag. Features like page menus will not work without one.")
 	}
 
@@ -353,27 +353,27 @@
 	}
 
 	if destination != "" {
-		viper.Set("PublishDir", destination)
+		viper.Set("publishDir", destination)
 	}
 
+	var dir string
 	if source != "" {
-		dir, _ := filepath.Abs(source)
-		viper.Set("WorkingDir", dir)
+		dir, _ = filepath.Abs(source)
 	} else {
-		dir, _ := os.Getwd()
-		viper.Set("WorkingDir", dir)
+		dir, _ = os.Getwd()
 	}
+	viper.Set("workingDir", dir)
 
 	if contentDir != "" {
-		viper.Set("ContentDir", contentDir)
+		viper.Set("contentDir", contentDir)
 	}
 
 	if layoutDir != "" {
-		viper.Set("LayoutDir", layoutDir)
+		viper.Set("layoutDir", layoutDir)
 	}
 
 	if cacheDir != "" {
-		viper.Set("CacheDir", cacheDir)
+		viper.Set("cacheDir", cacheDir)
 	}
 
 	cacheDir = viper.GetString("cacheDir")
@@ -386,14 +386,14 @@
 		if isDir == false {
 			mkdir(cacheDir)
 		}
-		viper.Set("CacheDir", cacheDir)
+		viper.Set("cacheDir", cacheDir)
 	} else {
-		viper.Set("CacheDir", helpers.GetTempDir("hugo_cache", hugofs.Source()))
+		viper.Set("cacheDir", helpers.GetTempDir("hugo_cache", hugofs.Source()))
 	}
 
-	if verboseLog || logging || (viper.IsSet("LogFile") && viper.GetString("LogFile") != "") {
-		if viper.IsSet("LogFile") && viper.GetString("LogFile") != "" {
-			jww.SetLogFile(viper.GetString("LogFile"))
+	if verboseLog || logging || (viper.IsSet("logFile") && viper.GetString("logFile") != "") {
+		if viper.IsSet("logFile") && viper.GetString("logFile") != "" {
+			jww.SetLogFile(viper.GetString("logFile"))
 		} else {
 			jww.UseTempLogFile("hugo")
 		}
@@ -448,7 +448,7 @@
 		fmt.Println("Config file changed:", e.Name)
 		// Force a full rebuild
 		utils.CheckErr(reCreateAndbuildSites(true))
-		if !viper.GetBool("DisableLiveReload") {
+		if !viper.GetBool("disableLiveReload") {
 			// Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized
 			livereload.ForceRefresh()
 		}
@@ -463,11 +463,11 @@
 	if renderToMemory {
 		hugofs.SetDestination(new(afero.MemMapFs))
 		// Rendering to memoryFS, publish to Root regardless of publishDir.
-		viper.Set("PublishDir", "/")
+		viper.Set("publishDir", "/")
 	}
 
 	if err := copyStatic(); err != nil {
-		return fmt.Errorf("Error copying static files to %s: %s", helpers.AbsPathify(viper.GetString("PublishDir")), err)
+		return fmt.Errorf("Error copying static files to %s: %s", helpers.AbsPathify(viper.GetString("publishDir")), err)
 	}
 	watch := false
 	if len(watches) > 0 && watches[0] {
@@ -478,7 +478,7 @@
 	}
 
 	if buildWatch {
-		jww.FEEDBACK.Println("Watching for changes in", helpers.AbsPathify(viper.GetString("ContentDir")))
+		jww.FEEDBACK.Println("Watching for changes in", helpers.AbsPathify(viper.GetString("contentDir")))
 		jww.FEEDBACK.Println("Press Ctrl+C to stop")
 		utils.CheckErr(NewWatcher(0))
 	}
@@ -532,7 +532,7 @@
 }
 
 func copyStatic() error {
-	publishDir := helpers.AbsPathify(viper.GetString("PublishDir")) + helpers.FilePathSeparator
+	publishDir := helpers.AbsPathify(viper.GetString("publishDir")) + helpers.FilePathSeparator
 
 	// If root, remove the second '/'
 	if publishDir == "//" {
@@ -567,10 +567,10 @@
 // getDirList provides NewWatcher() with a list of directories to watch for changes.
 func getDirList() []string {
 	var a []string
-	dataDir := helpers.AbsPathify(viper.GetString("DataDir"))
-	i18nDir := helpers.AbsPathify(viper.GetString("I18nDir"))
-	layoutDir := helpers.AbsPathify(viper.GetString("LayoutDir"))
-	staticDir := helpers.AbsPathify(viper.GetString("StaticDir"))
+	dataDir := helpers.AbsPathify(viper.GetString("dataDir"))
+	i18nDir := helpers.AbsPathify(viper.GetString("i18nDir"))
+	layoutDir := helpers.AbsPathify(viper.GetString("layoutDir"))
+	staticDir := helpers.AbsPathify(viper.GetString("staticDir"))
 	var themesDir string
 
 	if helpers.ThemeSet() {
@@ -580,22 +580,22 @@
 	walker := func(path string, fi os.FileInfo, err error) error {
 		if err != nil {
 			if path == dataDir && os.IsNotExist(err) {
-				jww.WARN.Println("Skip DataDir:", err)
+				jww.WARN.Println("Skip dataDir:", err)
 				return nil
 			}
 
 			if path == i18nDir && os.IsNotExist(err) {
-				jww.WARN.Println("Skip I18nDir:", err)
+				jww.WARN.Println("Skip i18nDir:", err)
 				return nil
 			}
 
 			if path == layoutDir && os.IsNotExist(err) {
-				jww.WARN.Println("Skip LayoutDir:", err)
+				jww.WARN.Println("Skip layoutDir:", err)
 				return nil
 			}
 
 			if path == staticDir && os.IsNotExist(err) {
-				jww.WARN.Println("Skip StaticDir:", err)
+				jww.WARN.Println("Skip staticDir:", err)
 				return nil
 			}
 
@@ -636,9 +636,9 @@
 	}
 
 	helpers.SymbolicWalk(hugofs.Source(), dataDir, walker)
-	helpers.SymbolicWalk(hugofs.Source(), helpers.AbsPathify(viper.GetString("ContentDir")), walker)
+	helpers.SymbolicWalk(hugofs.Source(), helpers.AbsPathify(viper.GetString("contentDir")), walker)
 	helpers.SymbolicWalk(hugofs.Source(), i18nDir, walker)
-	helpers.SymbolicWalk(hugofs.Source(), helpers.AbsPathify(viper.GetString("LayoutDir")), walker)
+	helpers.SymbolicWalk(hugofs.Source(), helpers.AbsPathify(viper.GetString("layoutDir")), walker)
 
 	helpers.SymbolicWalk(hugofs.Source(), staticDir, walker)
 	if helpers.ThemeSet() {
@@ -801,7 +801,7 @@
 				}
 
 				if len(staticEvents) > 0 {
-					publishDir := helpers.AbsPathify(viper.GetString("PublishDir")) + helpers.FilePathSeparator
+					publishDir := helpers.AbsPathify(viper.GetString("publishDir")) + helpers.FilePathSeparator
 
 					// If root, remove the second '/'
 					if publishDir == "//" {
@@ -812,11 +812,11 @@
 					const layout = "2006-01-02 15:04 -0700"
 					fmt.Println(time.Now().Format(layout))
 
-					if viper.GetBool("ForceSyncStatic") {
+					if viper.GetBool("forceSyncStatic") {
 						jww.FEEDBACK.Printf("Syncing all static files\n")
 						err := copyStatic()
 						if err != nil {
-							utils.StopOnErr(err, fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("PublishDir"))))
+							utils.StopOnErr(err, fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("publishDir"))))
 						}
 					} else {
 						staticSourceFs := getStaticSourceFs()
@@ -896,7 +896,7 @@
 						}
 					}
 
-					if !buildWatch && !viper.GetBool("DisableLiveReload") {
+					if !buildWatch && !viper.GetBool("disableLiveReload") {
 						// Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized
 
 						// force refresh when more than one file
@@ -919,7 +919,7 @@
 
 					rebuildSites(dynamicEvents)
 
-					if !buildWatch && !viper.GetBool("DisableLiveReload") {
+					if !buildWatch && !viper.GetBool("disableLiveReload") {
 						// Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized
 						livereload.ForceRefresh()
 					}
@@ -933,7 +933,7 @@
 	}()
 
 	if port > 0 {
-		if !viper.GetBool("DisableLiveReload") {
+		if !viper.GetBool("disableLiveReload") {
 			livereload.Initialize()
 			http.HandleFunc("/livereload.js", livereload.ServeJS)
 			http.HandleFunc("/livereload", livereload.Handler)
--- a/commands/import_jekyll.go
+++ b/commands/import_jekyll.go
@@ -221,7 +221,7 @@
 
 func createConfigFromJekyll(inpath string, kind string, jekyllConfig map[string]interface{}) (err error) {
 	title := "My New Hugo Site"
-	baseurl := "http://example.org/"
+	baseURL := "http://example.org/"
 
 	for key, value := range jekyllConfig {
 		lowerKey := strings.ToLower(key)
@@ -234,13 +234,13 @@
 
 		case "url":
 			if str, ok := value.(string); ok {
-				baseurl = str
+				baseURL = str
 			}
 		}
 	}
 
 	in := map[string]interface{}{
-		"baseurl":            baseurl,
+		"baseURL":            baseURL,
 		"title":              title,
 		"languageCode":       "en-us",
 		"disablePathToLower": true,
--- a/commands/list.go
+++ b/commands/list.go
@@ -49,7 +49,7 @@
 			return err
 		}
 
-		viper.Set("BuildDrafts", true)
+		viper.Set("buildDrafts", true)
 
 		sites, err := hugolib.NewHugoSitesFromConfiguration()
 
@@ -84,7 +84,7 @@
 			return err
 		}
 
-		viper.Set("BuildFuture", true)
+		viper.Set("buildFuture", true)
 
 		sites, err := hugolib.NewHugoSitesFromConfiguration()
 
@@ -119,7 +119,7 @@
 			return err
 		}
 
-		viper.Set("BuildExpired", true)
+		viper.Set("buildExpired", true)
 
 		sites, err := hugolib.NewHugoSitesFromConfiguration()
 
--- a/commands/new.go
+++ b/commands/new.go
@@ -89,11 +89,11 @@
 	}
 
 	if flagChanged(cmd.Flags(), "format") {
-		viper.Set("MetaDataFormat", configFormat)
+		viper.Set("metaDataFormat", configFormat)
 	}
 
 	if flagChanged(cmd.Flags(), "editor") {
-		viper.Set("NewContentEditor", contentEditor)
+		viper.Set("newContentEditor", contentEditor)
 	}
 
 	if len(args) < 1 {
--- a/commands/server.go
+++ b/commands/server.go
@@ -90,7 +90,7 @@
 	serverCmd.Flags().IntVarP(&serverPort, "port", "p", 1313, "port on which the server will listen")
 	serverCmd.Flags().StringVarP(&serverInterface, "bind", "", "127.0.0.1", "interface to which the server will bind")
 	serverCmd.Flags().BoolVarP(&serverWatch, "watch", "w", true, "watch filesystem for changes and recreate as needed")
-	serverCmd.Flags().BoolVarP(&serverAppend, "appendPort", "", true, "append port to baseurl")
+	serverCmd.Flags().BoolVarP(&serverAppend, "appendPort", "", true, "append port to baseURL")
 	serverCmd.Flags().BoolVar(&disableLiveReload, "disableLiveReload", false, "watch without enabling live browser reload on rebuild")
 	serverCmd.Flags().BoolVar(&renderToDisk, "renderToDisk", false, "render to Destination path (default is render to memory & serve from there)")
 	serverCmd.Flags().String("memstats", "", "log memory usage to this file")
@@ -109,11 +109,11 @@
 	}
 
 	if flagChanged(cmd.Flags(), "disableLiveReload") {
-		viper.Set("DisableLiveReload", disableLiveReload)
+		viper.Set("disableLiveReload", disableLiveReload)
 	}
 
 	if serverWatch {
-		viper.Set("Watch", true)
+		viper.Set("watch", true)
 	}
 
 	if viper.GetBool("watch") {
@@ -139,11 +139,11 @@
 
 	viper.Set("port", serverPort)
 
-	BaseURL, err := fixURL(baseURL)
+	baseURL, err = fixURL(baseURL)
 	if err != nil {
 		return err
 	}
-	viper.Set("BaseURL", BaseURL)
+	viper.Set("baseURL", baseURL)
 
 	if err := memStats(); err != nil {
 		jww.ERROR.Println("memstats error:", err)
@@ -158,7 +158,7 @@
 	if !renderToDisk {
 		hugofs.SetDestination(new(afero.MemMapFs))
 		// Rendering to memoryFS, publish to Root regardless of publishDir.
-		viper.Set("PublishDir", "/")
+		viper.Set("publishDir", "/")
 	}
 
 	if err := build(serverWatch); err != nil {
@@ -168,7 +168,7 @@
 	// Watch runs its own server as part of the routine
 	if serverWatch {
 		watchDirs := getDirList()
-		baseWatchDir := viper.GetString("WorkingDir")
+		baseWatchDir := viper.GetString("workingDir")
 		for i, dir := range watchDirs {
 			watchDirs[i], _ = helpers.GetRelativePath(dir, baseWatchDir)
 		}
@@ -190,19 +190,19 @@
 
 func serve(port int) {
 	if renderToDisk {
-		jww.FEEDBACK.Println("Serving pages from " + helpers.AbsPathify(viper.GetString("PublishDir")))
+		jww.FEEDBACK.Println("Serving pages from " + helpers.AbsPathify(viper.GetString("publishDir")))
 	} else {
 		jww.FEEDBACK.Println("Serving pages from memory")
 	}
 
 	httpFs := afero.NewHttpFs(hugofs.Destination())
-	fs := filesOnlyFs{httpFs.Dir(helpers.AbsPathify(viper.GetString("PublishDir")))}
+	fs := filesOnlyFs{httpFs.Dir(helpers.AbsPathify(viper.GetString("publishDir")))}
 	fileserver := http.FileServer(fs)
 
 	// We're only interested in the path
-	u, err := url.Parse(viper.GetString("BaseURL"))
+	u, err := url.Parse(viper.GetString("baseURL"))
 	if err != nil {
-		jww.ERROR.Fatalf("Invalid BaseURL: %s", err)
+		jww.ERROR.Fatalf("Invalid baseURL: %s", err)
 	}
 	if u.Path == "" || u.Path == "/" {
 		http.Handle("/", fileserver)
@@ -221,12 +221,12 @@
 	}
 }
 
-// fixURL massages the BaseURL into a form needed for serving
+// fixURL massages the baseURL into a form needed for serving
 // all pages correctly.
 func fixURL(s string) (string, error) {
 	useLocalhost := false
 	if s == "" {
-		s = viper.GetString("BaseURL")
+		s = viper.GetString("baseURL")
 		useLocalhost = true
 	}
 
@@ -262,7 +262,7 @@
 		if strings.Contains(u.Host, ":") {
 			u.Host, _, err = net.SplitHostPort(u.Host)
 			if err != nil {
-				return "", fmt.Errorf("Failed to split BaseURL hostpost: %s", err)
+				return "", fmt.Errorf("Failed to split baseURL hostpost: %s", err)
 			}
 		}
 		u.Host += fmt.Sprintf(":%d", serverPort)
--- a/commands/server_test.go
+++ b/commands/server_test.go
@@ -46,7 +46,7 @@
 	for i, test := range tests {
 		viper.Reset()
 		baseURL = test.CLIBaseURL
-		viper.Set("BaseURL", test.CfgBaseURL)
+		viper.Set("baseURL", test.CfgBaseURL)
 		serverAppend = test.AppendPort
 		serverPort = test.Port
 		result, err := fixURL(baseURL)
--- a/create/content.go
+++ b/create/content.go
@@ -67,7 +67,7 @@
 		return err
 	}
 
-	if err = page.SetSourceMetaData(metadata, parser.FormatToLeadRune(viper.GetString("MetaDataFormat"))); err != nil {
+	if err = page.SetSourceMetaData(metadata, parser.FormatToLeadRune(viper.GetString("metaDataFormat"))); err != nil {
 		return
 	}
 
@@ -78,7 +78,7 @@
 	}
 	jww.FEEDBACK.Println(helpers.AbsPathify(filepath.Join(viper.GetString("contentDir"), name)), "created")
 
-	editor := viper.GetString("NewContentEditor")
+	editor := viper.GetString("newContentEditor")
 
 	if editor != "" {
 		jww.FEEDBACK.Printf("Editing %s with %q ...\n", name, editor)
@@ -137,7 +137,7 @@
 		metadata["title"] = helpers.MakeTitle(helpers.Filename(name))
 	}
 
-	if x := parser.FormatSanitize(viper.GetString("MetaDataFormat")); x == "json" || x == "yaml" || x == "toml" {
+	if x := parser.FormatSanitize(viper.GetString("metaDataFormat")); x == "json" || x == "yaml" || x == "toml" {
 		metadata["date"] = time.Now().Format(time.RFC3339)
 	}
 
--- a/create/content_test.go
+++ b/create/content_test.go
@@ -69,7 +69,7 @@
 
 func initViper() {
 	viper.Reset()
-	viper.Set("MetaDataFormat", "toml")
+	viper.Set("metaDataFormat", "toml")
 	viper.Set("archetypeDir", filepath.Join(os.TempDir(), "archetypes"))
 	viper.Set("contentDir", filepath.Join(os.TempDir(), "content"))
 	viper.Set("themesDir", filepath.Join(os.TempDir(), "themes"))
--- a/docs/content/content/multilingual.md
+++ b/docs/content/content/multilingual.md
@@ -14,7 +14,7 @@
 Example:
 
 ```
-DefaultContentLanguage = "en"
+defaultContentLanguage = "en"
 
 Languages:
   en:
@@ -38,7 +38,7 @@
 With the config above, all content, sitemap, RSS feeds, paginations
 and taxonomy pages will be rendered below `/` in English (your default content language), and below `/fr` in French.
 
-If you want all of the languages to be put below their respective language code, enable `DefaultContentLanguageInSubdir: true` in your configuration.
+If you want all of the languages to be put below their respective language code, enable `defaultContentLanguageInSubdir: true` in your configuration.
 
 Only the obvious non-global options can be overridden per language. Examples of global options are `BaseURL`, `BuildDrafts`, etc.
 
@@ -81,10 +81,10 @@
 1. `/content/about.md`
 2. `/content/about.fr.md`
 
-In which case the config variable `DefaultContentLanguage` will be used to affect the default language `about.md`.  This way, you can
+In which case the config variable `defaultContentLanguage` will be used to affect the default language `about.md`.  This way, you can
 slowly start to translate your current content without having to rename everything.
 
-If left unspecified, the value for `DefaultContentLanguage` defaults to `en`.
+If left unspecified, the value for `defaultContentLanguage` defaults to `en`.
 
 By having the same _base file name_, the content pieces are linked together as translated pieces.
 
@@ -159,14 +159,12 @@
 i18n|MISSING_TRANSLATION|en|wordCount
 ```
 
-
-
 ### Menus
 
 You can define your menus for each language independently. The [creation of a menu]({{< relref "extras/menus.md" >}}) works analogous to earlier versions of Hugo, except that they have to be defined in their language-specific block in the configuration file:
 
 ```toml
-DefaultContentLanguage = "en"
+defaultContentLanguage = "en"
 
 [languages.en]
 weight = 0
--- a/docs/content/extras/aliases.md
+++ b/docs/content/extras/aliases.md
@@ -79,7 +79,7 @@
 
 When aliases are specified, Hugo creates a physical folder structure to match the alias entry, and, an html file specifying the canonical URL for the page, and a redirect target.
 
-Assuming a baseurl of `mysite.tld`, the contents of the html file will look something like:
+Assuming a baseURL of `mysite.tld`, the contents of the html file will look something like:
 
 ```html
 <!DOCTYPE html>
--- a/docs/content/extras/menus.md
+++ b/docs/content/extras/menus.md
@@ -127,7 +127,7 @@
     ---
 
 
-**NOTE:** The URLs must be relative to the context root. If the `BaseURL` is `http://example.com/mysite/`, then the URLs in the menu must not include the context root `mysite`. Using an absolute URL will overide the BaseURL. If the `URL` is `http://subdomain.example.com/`, the output will be `http://subdomain.example.com`. 
+**NOTE:** The URLs must be relative to the context root. If the `baseURL` is `http://example.com/mysite/`, then the URLs in the menu must not include the context root `mysite`. Using an absolute URL will overide the baseURL. If the `URL` is `http://subdomain.example.com/`, the output will be `http://subdomain.example.com`.
 
 ## Nesting
 
@@ -136,9 +136,9 @@
 The parent of an entry should be the identifier of another entry.
 Identifier should be unique (within a menu).
 
-The following order is used to determine an Identifier:   
+The following order is used to determine an Identifier:
 
-> Name > LinkTitle > Title. 
+> Name > LinkTitle > Title.
 
 This means that the title will be used unless
 linktitle is present, etc. In practice Name and Identifier are never
--- a/docs/content/extras/urls.md
+++ b/docs/content/extras/urls.md
@@ -35,11 +35,11 @@
 
 By default, all relative URLs encountered in the input are left unmodified,
 e.g. `/css/foo.css` would stay as `/css/foo.css`,
-i.e. `canonifyurls` defaults to `false`.
+i.e. `canonifyURLs` defaults to `false`.
 
-By setting `canonifyurls` to `true`, all relative URLs would instead
-be *canonicalized* using `baseurl`.  For example, assuming you have
-`baseurl = http://yoursite.example.com/` defined in the site-wide
+By setting `canonifyURLs` to `true`, all relative URLs would instead
+be *canonicalized* using `baseURL`.  For example, assuming you have
+`baseURL = http://yoursite.example.com/` defined in the site-wide
 `config.toml`, the relative URL `/css/foo.css` would be turned into
 the absolute URL `http://yoursite.example.com/css/foo.css`.
 
@@ -51,9 +51,9 @@
 be scheme-relative, so that http vs https can be decided based on how this
 page was retrieved.
 
-> Note: In the May 2014 release of Hugo v0.11, the default value of `canonifyurls` was switched from `true` to `false`, which we think is the better default and should continue to be the case going forward. So, please verify and adjust your website accordingly if you are upgrading from v0.10 or older versions.
+> Note: In the May 2014 release of Hugo v0.11, the default value of `canonifyURLs` was switched from `true` to `false`, which we think is the better default and should continue to be the case going forward. So, please verify and adjust your website accordingly if you are upgrading from v0.10 or older versions.
 
-To find out the current value of `canonifyurls` for your website, you may use the handy `hugo config` command added in v0.13:
+To find out the current value of `canonifyURLs` for your website, you may use the handy `hugo config` command added in v0.13:
 
     hugo config | grep -i canon
 
--- a/docs/content/meta/release-notes.md
+++ b/docs/content/meta/release-notes.md
@@ -218,7 +218,7 @@
 * Use absolute path when editing with editor {{<gh 1589>}}
 * Fix hugo server "Watching for changes" path display {{<gh 1721>}}
 * Do not strip special characters out of URLs {{<gh 1292>}}
-* Fix `RSSLink` when uglyurls are enabled {{<gh 175>}}
+* Fix `RSSLink` when uglyURLs are enabled {{<gh 175>}}
 * Get BaseURL from viper in server mode {{<gh 1821>}}
 * Fix shortcode handling in RST {{<gh 1904>}}
 * Use default sitemap configuration for homepage {{<gh 1304>}}
@@ -411,7 +411,7 @@
 * More Pygments highlighting options, including `line numbers`
 * Show help information to Windows users who try to double click on `hugo.exe`.
 * Add `bind` flag to `hugo server` to set the interface to which the server will bind
-* Add support for `canonifyurls` in `srcset`
+* Add support for `canonifyURLs` in `srcset`
 * Add shortcode support for HTML (content) files
 * Allow the same `shortcode` to  be used with or without inline content
 * Configurable RSS output filename
@@ -420,7 +420,7 @@
 * Fix panic with paginator and zero pages in result set.
 * Fix crossrefs on Windows.
 * Fix `eq` and `ne` template functions when used with a raw number combined with the result of `add`, `sub` etc.
-* Fix paginator with uglyurls
+* Fix paginator with uglyURLs
 * Fix {{< gh 998 >}}, supporting UTF8 characters in Permalinks.
 
 ## Notices
--- a/docs/content/overview/configuration.md
+++ b/docs/content/overview/configuration.md
@@ -49,7 +49,7 @@
 
 ```yaml
 ---
-baseurl: "http://yoursite.example.com/"
+baseURL: "http://yoursite.example.com/"
 ...
 ```
 Following is an example TOML configuration file with some default values.
@@ -57,12 +57,12 @@
 for use in templates:
 
 ```toml
-contentdir = "content"
-layoutdir = "layouts"
-publishdir = "public"
-builddrafts = false
-baseurl = "http://yoursite.example.com/"
-canonifyurls = true
+contentDir = "content"
+layoutDir = "layouts"
+publishDir = "public"
+buildDrafts = false
+baseURL = "http://yoursite.example.com/"
+canonifyURLs = true
 
 [taxonomies]
   category = "categories"
@@ -76,9 +76,9 @@
 
 ```yaml
 ---
-baseurl: "http://yoursite.example.com/"
+baseURL: "http://yoursite.example.com/"
 title: "Yoyodyne Widget Blogging"
-footnotereturnlinkcontents: "↩"
+footnoteReturnLinkContents: "↩"
 permalinks:
   post: /:year/:month/:title/
 params:
@@ -97,7 +97,7 @@
 along with their current, default values:
 
     ---
-    archetypedir:               "archetype"
+    archetypeDir:               "archetype"
     # hostname (and path) to the root, e.g. http://spf13.com/
     baseURL:                    ""
     # include content marked as draft
@@ -111,14 +111,14 @@
     canonifyURLs:               false
     # config file (default is path/config.yaml|json|toml)
     config:                     "config.toml"
-    contentdir:                 "content"
+    contentDir:                 "content"
     dataDir:                    "data"
     defaultExtension:           "html"
     defaultLayout:              "post"
     # Missing translations will default to this content language
-    DefaultContentLanguage:     "en"
+    defaultContentLanguage:     "en"
     # Renders the default content language in subdir, e.g. /en/. The root directory / will redirect to /en/
-    DefaultContentLanguageInSubdir: false
+    defaultContentLanguageInSubdir: false
     disableLiveReload:          false
     # Do not build RSS files
     disableRSS:                 false
@@ -142,7 +142,7 @@
     # google analytics tracking id
     googleAnalytics:            ""
     languageCode:               ""
-    layoutdir:                  "layouts"
+    layoutDir:                  "layouts"
     # Enable Logging
     log:                        false
     # Log File path (if set, logging enabled automatically)
@@ -160,7 +160,7 @@
     # Preserve special characters in taxonomy names ("Gérard Depardieu" vs "Gerard Depardieu")
     preserveTaxonomyNames:      false
     # filesystem path to write files to
-    publishdir:                 "public"
+    publishDir:                 "public"
     # enables syntax guessing for code fences without specified language
     pygmentsCodeFencesGuessSyntax: false
     # color-codes for highlighting derived from this style
@@ -171,11 +171,11 @@
     sitemap:
     # filesystem path to read files relative from
     source:                     ""
-    staticdir:                  "static"
+    staticDir:                  "static"
     # display memory and timing of different steps of the program
     stepAnalysis:               false
     # theme to use (located by default in /themes/THEMENAME/)
-    themesdir:                  "themes"
+    themesDir:                  "themes"
     theme:                      ""
     title:                      ""
     # if true, use /filename.html instead of /filename/
--- a/docs/content/overview/introduction.md
+++ b/docs/content/overview/introduction.md
@@ -80,7 +80,7 @@
 
 The second component is used when you're ready to publish your web
 site to the computer running your website. Running Hugo without any
-actions will rebuild your entire web site using the `baseurl` setting
+actions will rebuild your entire web site using the `baseURL` setting
 from your site's configuration file. That's required to have your page
 links work properly with most hosting companies.
 
--- a/docs/content/overview/quickstart.md
+++ b/docs/content/overview/quickstart.md
@@ -87,7 +87,7 @@
 
 * **archetypes**: You can create new content files in Hugo using the `hugo new` command. When you run that command, it adds few configuration properties to the post like date and title. [Archetype]({{< relref "content/archetypes.md" >}}) allows you to define your own configuration properties that will be added to the post front matter whenever `hugo new` command is used.
 
-* **config.toml**: Every website should have a configuration file at the root. By default, the configuration file uses `TOML` format but you can also use `YAML` or `JSON` formats as well. [TOML](https://github.com/toml-lang/toml) is minimal configuration file format that's easy to read due to obvious semantics. The configuration settings mentioned in the `config.toml` are applied to the full site. These configuration settings include `baseurl` and `title` of the website.
+* **config.toml**: Every website should have a configuration file at the root. By default, the configuration file uses `TOML` format but you can also use `YAML` or `JSON` formats as well. [TOML](https://github.com/toml-lang/toml) is minimal configuration file format that's easy to read due to obvious semantics. The configuration settings mentioned in the `config.toml` are applied to the full site. These configuration settings include `baseURL` and `title` of the website.
 
 * **content**: This is where you will store content of the website. Inside content, you will create sub-directories for different sections. Let's suppose your website has three actions -- `blog`, `article`, and `tutorial` then you will have three different directories for each of them inside the `content` directory. The name of the section i.e. `blog`, `article`, or `tutorial` will be used by Hugo to apply a specific layout applicable to that section.
 
@@ -318,7 +318,7 @@
 Let's update the configuration.
 
 ```toml
-baseurl = "http://example.org/"
+baseURL = "http://example.org/"
 languageCode = "en-us"
 title = "Shekhar Gulati Book Reviews"
 
@@ -484,10 +484,10 @@
 
 To generate Hugo website source you can use
 to deploy your website on GitHub pages,
-first edit `bookshelf/config.toml`, changing the `baseurl` line to:
+first edit `bookshelf/config.toml`, changing the `baseURL` line to:
 
 ```
-baseurl = "https://<your GitHub username>.github.io/bookshelf/"
+baseURL = "https://<your GitHub username>.github.io/bookshelf/"
 ```
 
 Then type the following command.
--- a/docs/content/templates/content.md
+++ b/docs/content/templates/content.md
@@ -69,7 +69,7 @@
 
     {{ partial "header.html" . }}
     {{ partial "subheader.html" . }}
-    {{ $baseurl := .Site.BaseURL }}
+    {{ $baseURL := .Site.BaseURL }}
 
     <section id="main">
       <h1 id="title">{{ .Title }}</h1>
@@ -88,12 +88,12 @@
         </section>
         <ul id="categories">
           {{ range .Params.topics }}
-            <li><a href="{{ $baseurl }}/topics/{{ . | urlize }}">{{ . }}</a> </li>
+            <li><a href="{{ $baseURL }}/topics/{{ . | urlize }}">{{ . }}</a> </li>
           {{ end }}
         </ul>
         <ul id="tags">
           {{ range .Params.tags }}
-            <li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> </li>
+            <li> <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a> </li>
           {{ end }}
         </ul>
         </div>
@@ -118,7 +118,7 @@
 
     {{ partial "header.html" . }}
     {{ partial "subheader.html" . }}
-    {{ $baseurl := .Site.BaseURL }}
+    {{ $baseURL := .Site.BaseURL }}
 
     <section id="main">
       <h1 id="title">{{ .Title }}</h1>
@@ -137,12 +137,12 @@
         </section>
         <ul id="categories">
           {{ range .Params.topics }}
-          <li><a href="{{ $baseurl }}/topics/{{ . | urlize }}">{{ . }}</a> </li>
+          <li><a href="{{ $baseURL }}/topics/{{ . | urlize }}">{{ . }}</a> </li>
           {{ end }}
         </ul>
         <ul id="tags">
           {{ range .Params.tags }}
-            <li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> </li>
+            <li> <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a> </li>
           {{ end }}
         </ul>
         </div>
--- a/docs/content/templates/go-templates.md
+++ b/docs/content/templates/go-templates.md
@@ -267,7 +267,7 @@
         {{ $title := .Site.Title }}
         {{ range .Params.tags }}
           <li>
-            <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a>
+            <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a>
             - {{ $title }}
           </li>
         {{ end }}
@@ -281,7 +281,7 @@
 
         {{ range .Params.tags }}
           <li>
-            <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a>
+            <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a>
             - {{ $.Site.Title }}
           </li>
         {{ end }}
--- a/docs/content/templates/variables.md
+++ b/docs/content/templates/variables.md
@@ -159,7 +159,7 @@
 **.Site.AllPages** Array of all pages regardless of their translation.<br>
 **.Site.Params** A container holding the values from the `params` section of your site configuration file. For example, a TOML config file might look like this:
 
-    baseurl = "http://yoursite.example.com/"
+    baseURL = "http://yoursite.example.com/"
 
     [params]
       description = "Tesla's Awesome Hugo Site"
--- a/docs/content/tutorials/create-a-multilingual-site.md
+++ b/docs/content/tutorials/create-a-multilingual-site.md
@@ -11,7 +11,7 @@
 weight: 10
 ---
 
-> **Note:** Since v0.17 Hugo has built-in support for the creation of multilingual website. [Read more about it]({{< relref "content/multilingual.md" >}}). 
+> **Note:** Since v0.17 Hugo has built-in support for the creation of multilingual website. [Read more about it]({{< relref "content/multilingual.md" >}}).
 
 ## Introduction
 
@@ -30,10 +30,10 @@
 **English Config `config_en.toml`**:
 
 ~~~toml
-baseurl = "http://acme.com/"
+baseURL = "http://acme.com/"
 title = "Acme Inc."
-contentdir = "content/en"
-publishdir = "public/en"
+contentDir = "content/en"
+publishDir = "public/en"
 
 [params]
     locale = "en-US"
@@ -42,10 +42,10 @@
 **Japanese Config `config_ja.toml`**:
 
 ~~~toml
-baseurl = "http://acme.jp/"
+baseURL = "http://acme.jp/"
 title = "有限会社アクミー"
-contentdir = "content/ja"
-publishdir = "public/ja"
+contentDir = "content/ja"
+publishDir = "public/ja"
 
 [params]
     locale = "ja-JP"
@@ -60,8 +60,8 @@
 **English Strings `en-US.yaml`**:
 
 ~~~yaml
-topslogan: Acme Inc.
-topsubslogan: You'll love us
+topSlogan: Acme Inc.
+topSubslogan: You'll love us
 ...
 ~~~
 
@@ -68,8 +68,8 @@
 **Japanese Strings `ja-JP.yaml`**:
 
 ~~~yaml
-topslogan: 有限会社アクミー
-topsubslogan: キット勝つぞ
+topSlogan: 有限会社アクミー
+topSubslogan: キット勝つぞ
 ...
 ~~~
 
@@ -90,8 +90,8 @@
   </head>
   <body>
     <div class="container">
-      <h1 class="header">{{ ( index $.Site.Data.translations $.Site.Params.locale ).topslogan }}</h1>
-      <h3 class="subheader">{{ ( index $.Site.Data.translations $.Site.Params.locale ).topsubslogan }}</h3>
+      <h1 class="header">{{ ( index $.Site.Data.translations $.Site.Params.locale ).topSlogan }}</h1>
+      <h3 class="subheader">{{ ( index $.Site.Data.translations $.Site.Params.locale ).topSubslogan }}</h3>
     </div>
   </body>
 </html>
@@ -126,7 +126,7 @@
 </time>
 ~~~
 
-This technique extracts the day, month and year by specifying ``.Date.Day``, ``.Date.Month``, and ``.Date.Year``, and uses the month number as a key, when indexing the month name data file.  
+This technique extracts the day, month and year by specifying ``.Date.Day``, ``.Date.Month``, and ``.Date.Year``, and uses the month number as a key, when indexing the month name data file.
 
 ## Create Multilingual Content
 
--- a/docs/content/tutorials/creating-a-new-theme.md
+++ b/docs/content/tutorials/creating-a-new-theme.md
@@ -489,7 +489,7 @@
 ```toml
 $ vi config.toml
 theme = "zafta"
-baseurl = "http://example.org/"
+baseURL = "http://example.org/"
 title = "My New Hugo Site"
 languageCode = "en-us"
 :wq
@@ -1074,13 +1074,13 @@
 ### Base URL
 
 While developing and testing your theme, did you notice that the links in the
-rendered `./public/index.html` file use the full "baseurl" from your
+rendered `./public/index.html` file use the full "baseURL" from your
 `./config.toml` file? That's because those files are intended to be deployed
 to your web server.
 
 Whenever you test your theme, you start Hugo in web server mode
 (with `hugo server`) and connect to it with your web browser.
-That command is smart enough to replace the "baseurl" with
+That command is smart enough to replace the "baseURL" with
 `http://localhost:1313` on the fly, so that the links automatically
 work for you.
 
--- a/docs/content/tutorials/github-pages-blog.md
+++ b/docs/content/tutorials/github-pages-blog.md
@@ -31,22 +31,22 @@
 
 ### Write a `config.yaml` File
 
-The very first step in creating a new Hugo site is to [write the config file](/overview/configuration/). This config file is important for at least two reasons: (1) this is where site-wide settings (like the websites `baseurl`) go, and (2) the config file dictates to some extent how Hugo will generate the website. For the example website I created a file `config.yaml` with the following contents
+The very first step in creating a new Hugo site is to [write the config file](/overview/configuration/). This config file is important for at least two reasons: (1) this is where site-wide settings (like the websites `baseURL`) go, and (2) the config file dictates to some extent how Hugo will generate the website. For the example website I created a file `config.yaml` with the following contents
 
     ---
-    contentdir: "content"
-    layoutdir: "layouts"
-    publishdir: "public"
+    contentDir: "content"
+    layoutDir: "layouts"
+    publishDir: "public"
     indexes:
       category: "categories"
-    baseurl: "http://spencerlyon2.github.io/hugo_gh_blog"
+    baseURL: "http://spencerlyon2.github.io/hugo_gh_blog"
     title: "Hugo Blog Template for GitHub Pages"
-    canonifyurls: true
+    canonifyURLs: true
     ...
 
-> **Caveat:** Hugo's former default of `canonifyurls: true` has been changed
+> **Caveat:** Hugo's former default of `canonifyURLs: true` has been changed
 > to `false` since this tutorial has written.  **Please make sure you manually
-> add `canonifyurls: true` to your `config.yaml`** if you are using Spencer's
+> add `canonifyURLs: true` to your `config.yaml`** if you are using Spencer's
 > https://github.com/spencerlyon2/hugo_gh_blog for this tutorial, or you *will*
 > run into problems such as the CSS files not loading.
 
@@ -55,7 +55,7 @@
 
 ### Define Structure of Website
 
-Hugo assumes that you organize the content of your site in a meaningful way and uses the same structure to render the website. Notice that we have the line `contentdir: "content"` in our configuration file. This means that all the actual content of the website should be placed somewhere within a folder named `content`. Hugo treats all directories in `content` as sections. For our example we only need one section: a place to hold our blog posts. So we created two new folders:
+Hugo assumes that you organize the content of your site in a meaningful way and uses the same structure to render the website. Notice that we have the line `contentDir: "content"` in our configuration file. This means that all the actual content of the website should be placed somewhere within a folder named `content`. Hugo treats all directories in `content` as sections. For our example we only need one section: a place to hold our blog posts. So we created two new folders:
 
 ```
 ▾ <root>/
@@ -115,7 +115,7 @@
 
 Once the site is set up and working properly, we need to push it to the correct branch of a GitHub repository so the website can be served through GitHub Pages. There are many ways to do this. Here I will show the workflow I currently use to manage my websites that are hosted through GitHub Pages.
 
-GitHub Pages will serve up a website for any repository that has a branch called `gh-pages` with a valid `index.html` file at that branch's root. A typical workflow might be to keep the content of a website on the `master` branch of a repository and the generated website on the `gh-pages` branch. This provides nice separation between input and output, but can be very tedious to work with. As a workaround, we will use the `git subtree` family of commands to have the `public` directory (or whatever `publishdir` is set to in your `config.yaml`) mirror the root of the `gh-pages` branch of the repository. This will allow us to do all our work on the `master` branch, run Hugo to have the site output into the `public` directory, and then push that directory directly to the correct place for GitHub Pages to serve our site.
+GitHub Pages will serve up a website for any repository that has a branch called `gh-pages` with a valid `index.html` file at that branch's root. A typical workflow might be to keep the content of a website on the `master` branch of a repository and the generated website on the `gh-pages` branch. This provides nice separation between input and output, but can be very tedious to work with. As a workaround, we will use the `git subtree` family of commands to have the `public` directory (or whatever `publishDir` is set to in your `config.yaml`) mirror the root of the `gh-pages` branch of the repository. This will allow us to do all our work on the `master` branch, run Hugo to have the site output into the `public` directory, and then push that directory directly to the correct place for GitHub Pages to serve our site.
 
 To get this properly set up, we will execute a series of commands at the terminal. I will include all of them in one place here for easy copy and paste, and will explain what each line does via comments. Note that this is to be run from the `<root>` directory (wherever the `content` and `layout` folders of your Hugo project live). Also note that you will need to change the commands that have the example repository GitHub address so that they point to your repo.
 
@@ -190,15 +190,15 @@
 **Deploy.sh:**
 
     #!/bin/bash
-    
+
     echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
-    
+
     # Build the project.
     hugo
-    
+
     # Add changes to git.
     git add -A
-    
+
     # Commit changes.
     msg="rebuilding site `date`"
     if [ $# -eq 1 ]
@@ -205,7 +205,7 @@
       then msg="$1"
     fi
     git commit -m "$msg"
-    
+
     # Push source and build repos.
     git push origin master
     git subtree push --prefix=public [email protected]:spencerlyon2/hugo_gh_blog.git gh-pages
--- a/docs/content/tutorials/migrate-from-jekyll.md
+++ b/docs/content/tutorials/migrate-from-jekyll.md
@@ -46,7 +46,7 @@
 
         {
             ..
-            "publishdir": "_site",
+            "publishDir": "_site",
             ..
         }
 
--- a/examples/blog/config.toml
+++ b/examples/blog/config.toml
@@ -1,4 +1,4 @@
-baseurl = "http://blog.hugoexample.com/"
+baseURL = "http://blog.hugoexample.com/"
 languageCode = "en-us"
 title = "Hugo Example Blog"
-canonifyurls = true
+canonifyURLs = true
--- a/examples/multilingual/config.toml
+++ b/examples/multilingual/config.toml
@@ -1,6 +1,6 @@
-baseurl = "http://example.com"
+baseURL = "http://example.com"
 
 [taxonomies]
 tag = "tags"
 group = "groups"
-menu = "menu"
\ No newline at end of file
+menu = "menu"
--- a/helpers/configProvider.go
+++ b/helpers/configProvider.go
@@ -49,7 +49,7 @@
 		return currentConfigProvider
 	}
 	// Some tests rely on this. We will fix that, eventually.
-	return viper.Get("CurrentContentLanguage").(ConfigProvider)
+	return viper.Get("currentContentLanguage").(ConfigProvider)
 }
 
 // CurrentPathSpec returns the current PathSpec.
--- a/helpers/content.go
+++ b/helpers/content.go
@@ -182,8 +182,8 @@
 // getHTMLRenderer creates a new Blackfriday HTML Renderer with the given configuration.
 func getHTMLRenderer(defaultFlags int, ctx *RenderingContext) blackfriday.Renderer {
 	renderParameters := blackfriday.HtmlRendererParameters{
-		FootnoteAnchorPrefix:       viper.GetString("FootnoteAnchorPrefix"),
-		FootnoteReturnLinkContents: viper.GetString("FootnoteReturnLinkContents"),
+		FootnoteAnchorPrefix:       viper.GetString("footnoteAnchorPrefix"),
+		FootnoteReturnLinkContents: viper.GetString("footnoteReturnLinkContents"),
 	}
 
 	b := len(ctx.DocumentID) != 0
@@ -271,8 +271,8 @@
 // getMmarkHTMLRenderer creates a new mmark HTML Renderer with the given configuration.
 func getMmarkHTMLRenderer(defaultFlags int, ctx *RenderingContext) mmark.Renderer {
 	renderParameters := mmark.HtmlRendererParameters{
-		FootnoteAnchorPrefix:       viper.GetString("FootnoteAnchorPrefix"),
-		FootnoteReturnLinkContents: viper.GetString("FootnoteReturnLinkContents"),
+		FootnoteAnchorPrefix:       viper.GetString("footnoteAnchorPrefix"),
+		FootnoteReturnLinkContents: viper.GetString("footnoteReturnLinkContents"),
 	}
 
 	b := len(ctx.DocumentID) != 0
--- a/helpers/content_renderer.go
+++ b/helpers/content_renderer.go
@@ -34,8 +34,8 @@
 }
 
 func (renderer *HugoHTMLRenderer) BlockCode(out *bytes.Buffer, text []byte, lang string) {
-	if viper.GetBool("PygmentsCodeFences") && (lang != "" || viper.GetBool("PygmentsCodeFencesGuessSyntax")) {
-		opts := viper.GetString("PygmentsOptions")
+	if viper.GetBool("pygmentsCodeFences") && (lang != "" || viper.GetBool("pygmentsCodeFencesGuessSyntax")) {
+		opts := viper.GetString("pygmentsOptions")
 		str := html.UnescapeString(string(text))
 		out.WriteString(Highlight(str, lang, opts))
 	} else {
@@ -117,7 +117,7 @@
 }
 
 func (renderer *HugoMmarkHTMLRenderer) BlockCode(out *bytes.Buffer, text []byte, lang string, caption []byte, subfigure bool, callouts bool) {
-	if viper.GetBool("PygmentsCodeFences") && (lang != "" || viper.GetBool("PygmentsCodeFencesGuessSyntax")) {
+	if viper.GetBool("pygmentsCodeFences") && (lang != "" || viper.GetBool("pygmentsCodeFencesGuessSyntax")) {
 		str := html.UnescapeString(string(text))
 		out.WriteString(Highlight(str, lang, ""))
 	} else {
--- a/helpers/content_renderer_test.go
+++ b/helpers/content_renderer_test.go
@@ -62,11 +62,11 @@
 	viper.Reset()
 	defer viper.Reset()
 
-	viper.Set("PygmentsStyle", "monokai")
-	viper.Set("PygmentsUseClasses", true)
+	viper.Set("pygmentsStyle", "monokai")
+	viper.Set("pygmentsUseClasses", true)
 
 	for i, d := range data {
-		viper.Set("PygmentsCodeFences", d.enabled)
+		viper.Set("pygmentsCodeFences", d.enabled)
 
 		result := render(d.input)
 
--- a/helpers/language.go
+++ b/helpers/language.go
@@ -54,7 +54,7 @@
 }
 
 func NewDefaultLanguage() *Language {
-	defaultLang := viper.GetString("DefaultContentLanguage")
+	defaultLang := viper.GetString("defaultContentLanguage")
 
 	if defaultLang == "" {
 		defaultLang = "en"
@@ -83,7 +83,7 @@
 		// Merge with global config.
 		// TODO(bep) consider making this part of a constructor func.
 
-		globalParams := viper.GetStringMap("Params")
+		globalParams := viper.GetStringMap("params")
 		for k, v := range globalParams {
 			if _, ok := l.params[k]; !ok {
 				l.params[k] = v
--- a/helpers/path.go
+++ b/helpers/path.go
@@ -154,13 +154,13 @@
 	}
 
 	// TODO(bep): Consider moving workingDir to argument list
-	return filepath.Clean(filepath.Join(viper.GetString("WorkingDir"), inPath))
+	return filepath.Clean(filepath.Join(viper.GetString("workingDir"), inPath))
 }
 
 // GetStaticDirPath returns the absolute path to the static file dir
 // for the current Hugo project.
 func GetStaticDirPath() string {
-	return AbsPathify(viper.GetString("StaticDir"))
+	return AbsPathify(viper.GetString("staticDir"))
 }
 
 // GetThemeDir gets the root directory of the current theme, if there is one.
@@ -342,7 +342,7 @@
 // PaginateAliasPath creates a path used to access the aliases in the paginator.
 func PaginateAliasPath(base string, page int) string {
 	paginatePath := Config().GetString("paginatePath")
-	uglify := viper.GetBool("UglyURLs")
+	uglify := viper.GetBool("uglyURLs")
 	var p string
 	if base != "" {
 		p = filepath.FromSlash(fmt.Sprintf("/%s/%s/%d", base, paginatePath, page))
--- a/helpers/path_test.go
+++ b/helpers/path_test.go
@@ -34,7 +34,7 @@
 )
 
 func initCommonTestConfig() {
-	viper.Set("CurrentContentLanguage", NewLanguage("en"))
+	viper.Set("currentContentLanguage", NewLanguage("en"))
 }
 
 func TestMakePath(t *testing.T) {
@@ -61,7 +61,7 @@
 	}
 
 	for _, test := range tests {
-		viper.Set("RemovePathAccents", test.removeAccents)
+		viper.Set("removePathAccents", test.removeAccents)
 		p := NewPathSpecFromConfig(viper.GetViper())
 		output := p.MakePath(test.input)
 		if output != test.expected {
@@ -102,7 +102,7 @@
 	defer viper.Reset()
 
 	initCommonTestConfig()
-	viper.Set("DisablePathToLower", true)
+	viper.Set("disablePathToLower", true)
 	p := NewPathSpecFromConfig(viper.GetViper())
 
 	tests := []struct {
@@ -549,7 +549,7 @@
 	for i, d := range data {
 		viper.Reset()
 		// todo see comment in AbsPathify
-		viper.Set("WorkingDir", d.workingDir)
+		viper.Set("workingDir", d.workingDir)
 
 		expected := AbsPathify(d.inPath)
 		if d.expected != expected {
@@ -559,7 +559,7 @@
 	t.Logf("Running platform specific path tests for %s", runtime.GOOS)
 	if runtime.GOOS == "windows" {
 		for i, d := range windowsData {
-			viper.Set("WorkingDir", d.workingDir)
+			viper.Set("workingDir", d.workingDir)
 
 			expected := AbsPathify(d.inPath)
 			if d.expected != expected {
@@ -568,7 +568,7 @@
 		}
 	} else {
 		for i, d := range unixData {
-			viper.Set("WorkingDir", d.workingDir)
+			viper.Set("workingDir", d.workingDir)
 
 			expected := AbsPathify(d.inPath)
 			if d.expected != expected {
--- a/helpers/pygments.go
+++ b/helpers/pygments.go
@@ -17,9 +17,6 @@
 	"bytes"
 	"crypto/sha1"
 	"fmt"
-	"github.com/spf13/hugo/hugofs"
-	jww "github.com/spf13/jwalterweatherman"
-	"github.com/spf13/viper"
 	"io"
 	"io/ioutil"
 	"os/exec"
@@ -26,6 +23,10 @@
 	"path/filepath"
 	"sort"
 	"strings"
+
+	"github.com/spf13/hugo/hugofs"
+	jww "github.com/spf13/jwalterweatherman"
+	"github.com/spf13/viper"
 )
 
 const pygmentsBin = "pygmentize"
@@ -62,8 +63,8 @@
 
 	fs := hugofs.Os()
 
-	ignoreCache := viper.GetBool("IgnoreCache")
-	cacheDir := viper.GetString("CacheDir")
+	ignoreCache := viper.GetBool("ignoreCache")
+	cacheDir := viper.GetString("cacheDir")
 	var cachefile string
 
 	if !ignoreCache && cacheDir != "" {
@@ -198,17 +199,17 @@
 func parseDefaultPygmentsOpts() (map[string]string, error) {
 
 	options := make(map[string]string)
-	err := parseOptions(options, viper.GetString("PygmentsOptions"))
+	err := parseOptions(options, viper.GetString("pygmentsOptions"))
 	if err != nil {
 		return nil, err
 	}
 
-	if viper.IsSet("PygmentsStyle") {
-		options["style"] = viper.GetString("PygmentsStyle")
+	if viper.IsSet("pygmentsStyle") {
+		options["style"] = viper.GetString("pygmentsStyle")
 	}
 
-	if viper.IsSet("PygmentsUseClasses") {
-		if viper.GetBool("PygmentsUseClasses") {
+	if viper.IsSet("pygmentsUseClasses") {
+		if viper.GetBool("pygmentsUseClasses") {
 			options["noclasses"] = "false"
 		} else {
 			options["noclasses"] = "true"
--- a/helpers/pygments_test.go
+++ b/helpers/pygments_test.go
@@ -35,8 +35,8 @@
 		{"style", "foo", false, false},
 	} {
 		viper.Reset()
-		viper.Set("PygmentsStyle", this.pygmentsStyle)
-		viper.Set("PygmentsUseClasses", this.pygmentsUseClasses)
+		viper.Set("pygmentsStyle", this.pygmentsStyle)
+		viper.Set("pygmentsUseClasses", this.pygmentsUseClasses)
 
 		result1, err := parsePygmentsOpts(this.in)
 		if b, ok := this.expect1.(bool); ok && !b {
@@ -72,14 +72,14 @@
 	} {
 		viper.Reset()
 
-		viper.Set("PygmentsOptions", this.pygmentsOptions)
+		viper.Set("pygmentsOptions", this.pygmentsOptions)
 
 		if s, ok := this.pygmentsStyle.(string); ok {
-			viper.Set("PygmentsStyle", s)
+			viper.Set("pygmentsStyle", s)
 		}
 
 		if b, ok := this.pygmentsUseClasses.(bool); ok {
-			viper.Set("PygmentsUseClasses", b)
+			viper.Set("pygmentsUseClasses", b)
 		}
 
 		result, err := parsePygmentsOpts(this.in)
--- a/helpers/url.go
+++ b/helpers/url.go
@@ -157,7 +157,7 @@
 		return in
 	}
 
-	baseURL := viper.GetString("BaseURL")
+	baseURL := viper.GetString("baseURL")
 	if strings.HasPrefix(in, "/") {
 		p, err := url.Parse(baseURL)
 		if err != nil {
@@ -219,7 +219,7 @@
 // RelURL creates a URL relative to the BaseURL root.
 // Note: The result URL will not include the context root if canonifyURLs is enabled.
 func (p *PathSpec) RelURL(in string, addLanguage bool) string {
-	baseURL := viper.GetString("BaseURL")
+	baseURL := viper.GetString("baseURL")
 	canonifyURLs := p.canonifyURLs
 	if (!strings.HasPrefix(in, baseURL) && strings.HasPrefix(in, "http")) || strings.HasPrefix(in, "//") {
 		return in
--- a/helpers/url_test.go
+++ b/helpers/url_test.go
@@ -62,10 +62,10 @@
 
 func doTestAbsURL(t *testing.T, defaultInSubDir, addLanguage, multilingual bool, lang string) {
 	viper.Reset()
-	viper.Set("Multilingual", multilingual)
-	viper.Set("CurrentContentLanguage", NewLanguage(lang))
-	viper.Set("DefaultContentLanguage", "en")
-	viper.Set("DefaultContentLanguageInSubdir", defaultInSubDir)
+	viper.Set("multilingual", multilingual)
+	viper.Set("currentContentLanguage", NewLanguage(lang))
+	viper.Set("defaultContentLanguage", "en")
+	viper.Set("defaultContentLanguageInSubdir", defaultInSubDir)
 
 	tests := []struct {
 		input    string
@@ -86,7 +86,7 @@
 	}
 
 	for _, test := range tests {
-		viper.Set("BaseURL", test.baseURL)
+		viper.Set("baseURL", test.baseURL)
 		p := NewPathSpecFromConfig(viper.GetViper())
 		output := p.AbsURL(test.input, addLanguage)
 		expected := test.expected
@@ -136,10 +136,10 @@
 
 func doTestRelURL(t *testing.T, defaultInSubDir, addLanguage, multilingual bool, lang string) {
 	viper.Reset()
-	viper.Set("Multilingual", multilingual)
-	viper.Set("CurrentContentLanguage", NewLanguage(lang))
-	viper.Set("DefaultContentLanguage", "en")
-	viper.Set("DefaultContentLanguageInSubdir", defaultInSubDir)
+	viper.Set("multilingual", multilingual)
+	viper.Set("currentContentLanguage", NewLanguage(lang))
+	viper.Set("defaultContentLanguage", "en")
+	viper.Set("defaultContentLanguageInSubdir", defaultInSubDir)
 
 	tests := []struct {
 		input    string
@@ -162,7 +162,7 @@
 	}
 
 	for i, test := range tests {
-		viper.Set("BaseURL", test.baseURL)
+		viper.Set("baseURL", test.baseURL)
 		viper.Set("canonifyURLs", test.canonify)
 		p := NewPathSpecFromConfig(viper.GetViper())
 
--- a/hugofs/fs.go
+++ b/hugofs/fs.go
@@ -81,7 +81,7 @@
 }
 
 func initSourceDependencies() {
-	workingDir := viper.GetString("WorkingDir")
+	workingDir := viper.GetString("workingDir")
 
 	if workingDir != "" {
 		workingDirFs = afero.NewBasePathFs(afero.NewReadOnlyFs(sourceFs), workingDir).(*afero.BasePathFs)
--- a/hugofs/fs_test.go
+++ b/hugofs/fs_test.go
@@ -14,10 +14,11 @@
 package hugofs
 
 import (
+	"testing"
+
 	"github.com/spf13/afero"
 	"github.com/spf13/viper"
 	"github.com/stretchr/testify/assert"
-	"testing"
 )
 
 func TestInitDefault(t *testing.T) {
@@ -71,7 +72,7 @@
 	viper.Reset()
 	defer viper.Reset()
 
-	viper.Set("WorkingDir", "/a/b/")
+	viper.Set("workingDir", "/a/b/")
 
 	InitMemFs()
 
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -53,57 +53,57 @@
 
 func loadDefaultSettings() {
 	viper.SetDefault("cleanDestinationDir", false)
-	viper.SetDefault("Watch", false)
-	viper.SetDefault("MetaDataFormat", "toml")
-	viper.SetDefault("Disable404", false)
-	viper.SetDefault("DisableRSS", false)
-	viper.SetDefault("DisableSitemap", false)
-	viper.SetDefault("DisableRobotsTXT", false)
-	viper.SetDefault("ContentDir", "content")
-	viper.SetDefault("LayoutDir", "layouts")
-	viper.SetDefault("StaticDir", "static")
-	viper.SetDefault("ArchetypeDir", "archetypes")
-	viper.SetDefault("PublishDir", "public")
-	viper.SetDefault("DataDir", "data")
-	viper.SetDefault("I18nDir", "i18n")
-	viper.SetDefault("ThemesDir", "themes")
-	viper.SetDefault("DefaultLayout", "post")
-	viper.SetDefault("BuildDrafts", false)
-	viper.SetDefault("BuildFuture", false)
-	viper.SetDefault("BuildExpired", false)
-	viper.SetDefault("UglyURLs", false)
-	viper.SetDefault("Verbose", false)
-	viper.SetDefault("IgnoreCache", false)
-	viper.SetDefault("CanonifyURLs", false)
-	viper.SetDefault("RelativeURLs", false)
-	viper.SetDefault("RemovePathAccents", false)
-	viper.SetDefault("Taxonomies", map[string]string{"tag": "tags", "category": "categories"})
-	viper.SetDefault("Permalinks", make(PermalinkOverrides, 0))
-	viper.SetDefault("Sitemap", Sitemap{Priority: -1, Filename: "sitemap.xml"})
-	viper.SetDefault("DefaultExtension", "html")
-	viper.SetDefault("PygmentsStyle", "monokai")
-	viper.SetDefault("PygmentsUseClasses", false)
-	viper.SetDefault("PygmentsCodeFences", false)
-	viper.SetDefault("PygmentsOptions", "")
-	viper.SetDefault("DisableLiveReload", false)
-	viper.SetDefault("PluralizeListTitles", true)
-	viper.SetDefault("PreserveTaxonomyNames", false)
-	viper.SetDefault("ForceSyncStatic", false)
-	viper.SetDefault("FootnoteAnchorPrefix", "")
-	viper.SetDefault("FootnoteReturnLinkContents", "")
-	viper.SetDefault("NewContentEditor", "")
-	viper.SetDefault("Paginate", 10)
-	viper.SetDefault("PaginatePath", "page")
-	viper.SetDefault("Blackfriday", helpers.NewBlackfriday(viper.GetViper()))
-	viper.SetDefault("RSSUri", "index.xml")
-	viper.SetDefault("SectionPagesMenu", "")
-	viper.SetDefault("DisablePathToLower", false)
-	viper.SetDefault("HasCJKLanguage", false)
-	viper.SetDefault("EnableEmoji", false)
-	viper.SetDefault("PygmentsCodeFencesGuessSyntax", false)
-	viper.SetDefault("UseModTimeAsFallback", false)
-	viper.SetDefault("CurrentContentLanguage", helpers.NewDefaultLanguage())
-	viper.SetDefault("DefaultContentLanguage", "en")
-	viper.SetDefault("DefaultContentLanguageInSubdir", false)
-	viper.SetDefault("EnableMissingTranslationPlaceholders", false)
+	viper.SetDefault("watch", false)
+	viper.SetDefault("metaDataFormat", "toml")
+	viper.SetDefault("disable404", false)
+	viper.SetDefault("disableRSS", false)
+	viper.SetDefault("disableSitemap", false)
+	viper.SetDefault("disableRobotsTXT", false)
+	viper.SetDefault("contentDir", "content")
+	viper.SetDefault("layoutDir", "layouts")
+	viper.SetDefault("staticDir", "static")
+	viper.SetDefault("archetypeDir", "archetypes")
+	viper.SetDefault("publishDir", "public")
+	viper.SetDefault("dataDir", "data")
+	viper.SetDefault("i18nDir", "i18n")
+	viper.SetDefault("themesDir", "themes")
+	viper.SetDefault("defaultLayout", "post")
+	viper.SetDefault("buildDrafts", false)
+	viper.SetDefault("buildFuture", false)
+	viper.SetDefault("buildExpired", false)
+	viper.SetDefault("uglyURLs", false)
+	viper.SetDefault("verbose", false)
+	viper.SetDefault("ignoreCache", false)
+	viper.SetDefault("canonifyURLs", false)
+	viper.SetDefault("relativeURLs", false)
+	viper.SetDefault("removePathAccents", false)
+	viper.SetDefault("taxonomies", map[string]string{"tag": "tags", "category": "categories"})
+	viper.SetDefault("permalinks", make(PermalinkOverrides, 0))
+	viper.SetDefault("sitemap", Sitemap{Priority: -1, Filename: "sitemap.xml"})
+	viper.SetDefault("defaultExtension", "html")
+	viper.SetDefault("pygmentsStyle", "monokai")
+	viper.SetDefault("pygmentsUseClasses", false)
+	viper.SetDefault("pygmentsCodeFences", false)
+	viper.SetDefault("pygmentsOptions", "")
+	viper.SetDefault("disableLiveReload", false)
+	viper.SetDefault("pluralizeListTitles", true)
+	viper.SetDefault("preserveTaxonomyNames", false)
+	viper.SetDefault("forceSyncStatic", false)
+	viper.SetDefault("footnoteAnchorPrefix", "")
+	viper.SetDefault("footnoteReturnLinkContents", "")
+	viper.SetDefault("newContentEditor", "")
+	viper.SetDefault("paginate", 10)
+	viper.SetDefault("paginatePath", "page")
+	viper.SetDefault("blackfriday", helpers.NewBlackfriday(viper.GetViper()))
+	viper.SetDefault("rSSUri", "index.xml")
+	viper.SetDefault("sectionPagesMenu", "")
+	viper.SetDefault("disablePathToLower", false)
+	viper.SetDefault("hasCJKLanguage", false)
+	viper.SetDefault("enableEmoji", false)
+	viper.SetDefault("pygmentsCodeFencesGuessSyntax", false)
+	viper.SetDefault("useModTimeAsFallback", false)
+	viper.SetDefault("currentContentLanguage", helpers.NewDefaultLanguage())
+	viper.SetDefault("defaultContentLanguage", "en")
+	viper.SetDefault("defaultContentLanguageInSubdir", false)
+	viper.SetDefault("enableMissingTranslationPlaceholders", false)
 }
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -35,5 +35,5 @@
 	require.NoError(t, LoadGlobalConfig("", "hugo.toml"))
 	assert.Equal(t, "side", helpers.Config().GetString("paginatePath"))
 	// default
-	assert.Equal(t, "layouts", viper.GetString("LayoutDir"))
+	assert.Equal(t, "layouts", viper.GetString("layoutDir"))
 }
--- a/hugolib/embedded_shortcodes_test.go
+++ b/hugolib/embedded_shortcodes_test.go
@@ -81,8 +81,8 @@
 	if !helpers.HasPygments() {
 		t.Skip("Skip test as Pygments is not installed")
 	}
-	viper.Set("PygmentsStyle", "bw")
-	viper.Set("PygmentsUseClasses", false)
+	viper.Set("pygmentsStyle", "bw")
+	viper.Set("pygmentsUseClasses", false)
 
 	for i, this := range []struct {
 		in, expected string
@@ -311,7 +311,7 @@
 		templ.Lookup("").Funcs(tweetFuncMap)
 
 		p, _ := pageFromString(simplePage, "simple.md")
-		cacheFileID := viper.GetString("CacheDir") + url.QueryEscape("https://api.twitter.com/1/statuses/oembed.json?id=666616452582129664")
+		cacheFileID := viper.GetString("cacheDir") + url.QueryEscape("https://api.twitter.com/1/statuses/oembed.json?id=666616452582129664")
 		defer os.Remove(cacheFileID)
 		output, err := HandleShortcodes(this.in, p, templ)
 
--- a/hugolib/handler_page.go
+++ b/hugolib/handler_page.go
@@ -114,7 +114,7 @@
 
 	// TODO(bep) these page handlers need to be re-evaluated, as it is hard to
 	// process a page in isolation. See the new preRender func.
-	if viper.GetBool("EnableEmoji") {
+	if viper.GetBool("enableEmoji") {
 		p.rawContent = helpers.Emojify(p.rawContent)
 	}
 
--- a/hugolib/handler_test.go
+++ b/hugolib/handler_test.go
@@ -40,7 +40,7 @@
 		{Name: filepath.FromSlash("sect/doc8.html"), Content: []byte("---\nmarkup: md\n---\n# title\nsome *content*")},
 	}
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 	viper.Set("verbose", true)
 
 	s := &Site{
--- a/hugolib/hugo_sites.go
+++ b/hugolib/hugo_sites.go
@@ -73,7 +73,7 @@
 
 func createSitesFromConfig() ([]*Site, error) {
 	var sites []*Site
-	multilingual := viper.GetStringMap("Languages")
+	multilingual := viper.GetStringMap("languages")
 	if len(multilingual) == 0 {
 		sites = append(sites, newSite(helpers.NewDefaultLanguage()))
 	}
@@ -339,12 +339,12 @@
 		return nil
 	}
 
-	if viper.GetBool("DisableSitemap") {
+	if viper.GetBool("disableSitemap") {
 		return nil
 	}
 
 	// TODO(bep) DRY
-	sitemapDefault := parseSitemap(viper.GetStringMap("Sitemap"))
+	sitemapDefault := parseSitemap(viper.GetStringMap("sitemap"))
 
 	s := h.Sites[0]
 
--- a/hugolib/hugo_sites_test.go
+++ b/hugolib/hugo_sites_test.go
@@ -40,7 +40,7 @@
 	loadDefaultSettings()
 
 	// Default is false, but true is easier to use as default in tests
-	viper.Set("DefaultContentLanguageInSubdir", true)
+	viper.Set("defaultContentLanguageInSubdir", true)
 
 	if err := hugofs.Source().Mkdir("content", 0755); err != nil {
 		panic("Content folder creation failed.")
@@ -56,7 +56,7 @@
 
 func doTestMultiSitesMainLangInRoot(t *testing.T, defaultInSubDir bool) {
 	testCommonResetState()
-	viper.Set("DefaultContentLanguageInSubdir", defaultInSubDir)
+	viper.Set("defaultContentLanguageInSubdir", defaultInSubDir)
 	siteConfig := testSiteConfig{DefaultContentLanguage: "fr"}
 
 	sites := createMultiTestSites(t, siteConfig, multiSiteTOMLConfigTemplate)
@@ -155,7 +155,7 @@
 }
 
 func replaceDefaultContentLanguageValue(value string, defaultInSubDir bool) string {
-	replace := viper.GetString("DefaultContentLanguage") + "/"
+	replace := viper.GetString("defaultContentLanguage") + "/"
 	if !defaultInSubDir {
 		value = strings.Replace(value, replace, "", 1)
 
@@ -639,7 +639,7 @@
 
 func TestChangeDefaultLanguage(t *testing.T) {
 	testCommonResetState()
-	viper.Set("DefaultContentLanguageInSubdir", false)
+	viper.Set("defaultContentLanguageInSubdir", false)
 
 	sites := createMultiTestSites(t, testSiteConfig{DefaultContentLanguage: "fr"}, multiSiteTOMLConfigTemplate)
 	cfg := BuildCfg{}
@@ -771,14 +771,14 @@
 </nav>`
 
 var multiSiteTOMLConfigTemplate = `
-DefaultExtension = "html"
-baseurl = "http://example.com/blog"
-DisableSitemap = false
-DisableRSS = false
-RSSUri = "index.xml"
+defaultExtension = "html"
+baseURL = "http://example.com/blog"
+disableSitemap = false
+disableRSS = false
+rssURI = "index.xml"
 
 paginate = 1
-DefaultContentLanguage = "{{ .DefaultContentLanguage }}"
+defaultContentLanguage = "{{ .DefaultContentLanguage }}"
 
 [permalinks]
 other = "/somewhere/else/:filename"
@@ -830,14 +830,14 @@
 `
 
 var multiSiteYAMLConfig = `
-DefaultExtension: "html"
-baseurl: "http://example.com/blog"
-DisableSitemap: false
-DisableRSS: false
-RSSUri: "index.xml"
+defaultExtension: "html"
+baseURL: "http://example.com/blog"
+disableSitemap: false
+disableRSS: false
+rssURI: "index.xml"
 
 paginate: 1
-DefaultContentLanguage: "fr"
+defaultContentLanguage: "fr"
 
 permalinks:
     other: "/somewhere/else/:filename"
@@ -890,13 +890,13 @@
 
 var multiSiteJSONConfig = `
 {
-  "DefaultExtension": "html",
-  "baseurl": "http://example.com/blog",
-  "DisableSitemap": false,
-  "DisableRSS": false,
-  "RSSUri": "index.xml",
+  "defaultExtension": "html",
+  "baseURL": "http://example.com/blog",
+  "disableSitemap": false,
+  "disableRSS": false,
+  "rssURI": "index.xml",
   "paginate": 1,
-  "DefaultContentLanguage": "fr",
+  "defaultContentLanguage": "fr",
   "permalinks": {
     "other": "/somewhere/else/:filename"
   },
@@ -1080,7 +1080,7 @@
 ---
 # doc4
 *du contenu francophone*
-NOTE: should use the DefaultContentLanguage and mark this doc as 'fr'.
+NOTE: should use the defaultContentLanguage and mark this doc as 'fr'.
 NOTE: doesn't have any corresponding translation in 'en'
 `)},
 		{Name: filepath.FromSlash("other/doc5.fr.md"), Content: []byte(`---
--- a/hugolib/menu_test.go
+++ b/hugolib/menu_test.go
@@ -376,7 +376,7 @@
 func doTestMenuWithUnicodeURLs(t *testing.T, canonifyURLs bool) {
 	testCommonResetState()
 
-	viper.Set("CanonifyURLs", canonifyURLs)
+	viper.Set("canonifyURLs", canonifyURLs)
 
 	s := setupMenuTests(t, menuPageSources)
 
@@ -398,12 +398,12 @@
 	doTestSectionPagesMenu(false, t)
 }
 
-func doTestSectionPagesMenu(canonifyUrls bool, t *testing.T) {
+func doTestSectionPagesMenu(canonifyURLs bool, t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("SectionPagesMenu", "spm")
+	viper.Set("sectionPagesMenu", "spm")
 
-	viper.Set("CanonifyURLs", canonifyUrls)
+	viper.Set("canonifyURLs", canonifyURLs)
 	s := setupMenuTests(t, menuPageSectionsSources)
 
 	assert.Equal(t, 3, len(s.Sections))
@@ -459,7 +459,7 @@
 func TestTaxonomyNodeMenu(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("CanonifyURLs", true)
+	viper.Set("canonifyURLs", true)
 	s := setupMenuTests(t, menuPageSources)
 
 	for i, this := range []struct {
@@ -544,8 +544,8 @@
 func TestHomeNodeMenu(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("CanonifyURLs", true)
-	viper.Set("UglyURLs", true)
+	viper.Set("canonifyURLs", true)
+	viper.Set("uglyURLs", true)
 
 	s := setupMenuTests(t, menuPageSources)
 
@@ -660,11 +660,11 @@
 	menus, err := tomlToMap(confMenu1)
 
 	if err != nil {
-		t.Fatalf("Unable to Read menus: %v", err)
+		t.Fatalf("Unable to read menus: %v", err)
 	}
 
 	viper.Set("menu", menus["menu"])
-	viper.Set("baseurl", "http://foo.local/Zoo/")
+	viper.Set("baseURL", "http://foo.local/Zoo/")
 }
 
 func setupMenuTests(t *testing.T, pageSources []source.ByteSource) *Site {
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -588,10 +588,10 @@
 		// fmt.Printf("have a section override for %q in section %s → %s\n", p.Title, p.Section, permalink)
 	} else {
 		if len(pSlug) > 0 {
-			permalink = helpers.URLPrep(viper.GetBool("UglyURLs"), path.Join(dir, p.Slug+"."+p.Extension()))
+			permalink = helpers.URLPrep(viper.GetBool("uglyURLs"), path.Join(dir, p.Slug+"."+p.Extension()))
 		} else {
 			t := p.Source.TranslationBaseName()
-			permalink = helpers.URLPrep(viper.GetBool("UglyURLs"), path.Join(dir, helpers.ReplaceExtension(strings.TrimSpace(t), p.Extension())))
+			permalink = helpers.URLPrep(viper.GetBool("uglyURLs"), path.Join(dir, helpers.ReplaceExtension(strings.TrimSpace(t), p.Extension())))
 		}
 	}
 
@@ -604,7 +604,7 @@
 	if p.extension != "" {
 		return p.extension
 	}
-	return viper.GetString("DefaultExtension")
+	return viper.GetString("defaultExtension")
 }
 
 // AllTranslations returns all translations, including the current Page.
@@ -637,8 +637,8 @@
 }
 
 func (p *Page) shouldBuild() bool {
-	return shouldBuild(viper.GetBool("BuildFuture"), viper.GetBool("BuildExpired"),
-		viper.GetBool("BuildDrafts"), p.Draft, p.PublishDate, p.ExpiryDate)
+	return shouldBuild(viper.GetBool("buildFuture"), viper.GetBool("buildExpired"),
+		viper.GetBool("buildDrafts"), p.Draft, p.PublishDate, p.ExpiryDate)
 }
 
 func shouldBuild(buildFuture bool, buildExpired bool, buildDrafts bool, Draft bool,
@@ -697,7 +697,7 @@
 		return "", err
 	}
 
-	if viper.GetBool("CanonifyURLs") {
+	if viper.GetBool("canonifyURLs") {
 		// replacements for relpermalink with baseURL on the form http://myhost.com/sub/ will fail later on
 		// have to return the URL relative from baseURL
 		relpath, err := helpers.GetRelativePath(link.String(), string(p.Site.BaseURL))
@@ -842,8 +842,8 @@
 		p.Draft = !*published
 	}
 
-	if p.Date.IsZero() && viper.GetBool("UseModTimeAsFallback") {
-		fi, err := hugofs.Source().Stat(filepath.Join(helpers.AbsPathify(viper.GetString("ContentDir")), p.File.Path()))
+	if p.Date.IsZero() && viper.GetBool("useModTimeAsFallback") {
+		fi, err := hugofs.Source().Stat(filepath.Join(helpers.AbsPathify(viper.GetString("contentDir")), p.File.Path()))
 		if err == nil {
 			p.Date = fi.ModTime()
 		}
@@ -855,7 +855,7 @@
 
 	if isCJKLanguage != nil {
 		p.isCJKLanguage = *isCJKLanguage
-	} else if viper.GetBool("HasCJKLanguage") {
+	} else if viper.GetBool("hasCJKLanguage") {
 		if cjk.Match(p.rawContent) {
 			p.isCJKLanguage = true
 		} else {
--- a/hugolib/page_permalink_test.go
+++ b/hugolib/page_permalink_test.go
@@ -59,10 +59,10 @@
 		{"x/y/z/boofar.md", "", "", "/z/y/q/", false, false, "/z/y/q/", "/z/y/q/"},
 	}
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 	for i, test := range tests {
-		viper.Set("uglyurls", test.uglyURLs)
-		viper.Set("canonifyurls", test.canonifyURLs)
+		viper.Set("uglyURLs", test.uglyURLs)
+		viper.Set("canonifyURLs", test.canonifyURLs)
 		info := newSiteInfo(siteBuilderCfg{baseURL: string(test.base), language: helpers.NewDefaultLanguage()})
 
 		p := &Page{
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -830,7 +830,7 @@
 
 func TestWordCountWithAllCJKRunesHasCJKLanguage(t *testing.T) {
 	testCommonResetState()
-	viper.Set("HasCJKLanguage", true)
+	viper.Set("hasCJKLanguage", true)
 
 	assertFunc := func(t *testing.T, ext string, pages Pages) {
 		p := pages[0]
@@ -844,7 +844,7 @@
 func TestWordCountWithMainEnglishWithCJKRunes(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("HasCJKLanguage", true)
+	viper.Set("hasCJKLanguage", true)
 
 	assertFunc := func(t *testing.T, ext string, pages Pages) {
 		p := pages[0]
@@ -863,7 +863,7 @@
 
 func TestWordCountWithIsCJKLanguageFalse(t *testing.T) {
 	testCommonResetState()
-	viper.Set("HasCJKLanguage", true)
+	viper.Set("hasCJKLanguage", true)
 
 	assertFunc := func(t *testing.T, ext string, pages Pages) {
 		p := pages[0]
@@ -1099,7 +1099,7 @@
 func TestPagePaths(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 	siteParmalinksSetting := PermalinkOverrides{
 		"post": ":year/:month/:day/:title/",
 	}
--- a/hugolib/pagination_test.go
+++ b/hugolib/pagination_test.go
@@ -195,7 +195,7 @@
 func TestPaginationURLFactory(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("PaginatePath", "zoo")
+	viper.Set("paginatePath", "zoo")
 	unicode := newPaginationURLFactory("новости проекта")
 	fooBar := newPaginationURLFactory("foo", "bar")
 
--- a/hugolib/robotstxt_test.go
+++ b/hugolib/robotstxt_test.go
@@ -34,7 +34,7 @@
 
 	hugofs.InitMemFs()
 
-	viper.Set("baseurl", "http://auth/bub/")
+	viper.Set("baseURL", "http://auth/bub/")
 	viper.Set("enableRobotsTXT", true)
 
 	s := &Site{
@@ -54,6 +54,6 @@
 
 	robots := helpers.ReaderToBytes(robotsFile)
 	if !bytes.HasPrefix(robots, []byte("User-agent: Googlebot")) {
-		t.Errorf("Robots file should start with 'User-agentL Googlebot'. %s", robots)
+		t.Errorf("Robots file should start with 'User-agent: Googlebot'. %s", robots)
 	}
 }
--- a/hugolib/rss_test.go
+++ b/hugolib/rss_test.go
@@ -45,8 +45,8 @@
 	testCommonResetState()
 
 	rssURI := "public/customrss.xml"
-	viper.Set("baseurl", "http://auth/bub/")
-	viper.Set("RSSUri", rssURI)
+	viper.Set("baseURL", "http://auth/bub/")
+	viper.Set("rssURI", rssURI)
 
 	for _, s := range weightedSources {
 		writeSource(t, filepath.Join("content", s.Name), string(s.Content))
--- a/hugolib/shortcode_test.go
+++ b/hugolib/shortcode_test.go
@@ -305,8 +305,8 @@
 	if !helpers.HasPygments() {
 		t.Skip("Skip test as Pygments is not installed")
 	}
-	viper.Set("PygmentsStyle", "bw")
-	viper.Set("PygmentsUseClasses", false)
+	viper.Set("pygmentsStyle", "bw")
+	viper.Set("pygmentsUseClasses", false)
 
 	templ := tpl.New()
 
@@ -455,14 +455,14 @@
 	testCommonResetState()
 
 	baseURL := "http://foo/bar"
-	viper.Set("DefaultExtension", "html")
-	viper.Set("DefaultContentLanguage", "en")
-	viper.Set("baseurl", baseURL)
-	viper.Set("UglyURLs", false)
+	viper.Set("defaultExtension", "html")
+	viper.Set("defaultContentLanguage", "en")
+	viper.Set("baseURL", baseURL)
+	viper.Set("uglyURLs", false)
 	viper.Set("verbose", true)
 
-	viper.Set("pygmentsuseclasses", true)
-	viper.Set("pygmentscodefences", true)
+	viper.Set("pygmentsUseClasses", true)
+	viper.Set("pygmentsCodefences", true)
 
 	tests := []struct {
 		contentPath string
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -819,8 +819,8 @@
 
 func (s *Site) setCurrentLanguageConfig() error {
 	// There are sadly some global template funcs etc. that need the language information.
-	viper.Set("Multilingual", s.multilingualEnabled())
-	viper.Set("CurrentContentLanguage", s.Language)
+	viper.Set("multilingual", s.multilingualEnabled())
+	viper.Set("currentContentLanguage", s.Language)
 	// Cache the current config.
 	helpers.InitConfigProviderForCurrentContentLanguage()
 	return tpl.SetTranslateLang(s.Language)
@@ -886,7 +886,7 @@
 		return err
 	}
 
-	staticDir := helpers.AbsPathify(viper.GetString("StaticDir") + "/")
+	staticDir := helpers.AbsPathify(viper.GetString("staticDir") + "/")
 
 	s.Source = &source.Filesystem{
 		AvoidPaths: []string{staticDir},
@@ -907,7 +907,7 @@
 
 // SitemapAbsURL is a convenience method giving the absolute URL to the sitemap.
 func (s *SiteInfo) SitemapAbsURL() string {
-	sitemapDefault := parseSitemap(viper.GetStringMap("Sitemap"))
+	sitemapDefault := parseSitemap(viper.GetStringMap("sitemap"))
 	p := s.HomeAbsURL()
 	if !strings.HasSuffix(p, "/") {
 		p += "/"
@@ -930,12 +930,12 @@
 	params := lang.Params()
 
 	permalinks := make(PermalinkOverrides)
-	for k, v := range viper.GetStringMapString("Permalinks") {
+	for k, v := range viper.GetStringMapString("permalinks") {
 		permalinks[k] = pathPattern(v)
 	}
 
-	defaultContentInSubDir := viper.GetBool("DefaultContentLanguageInSubdir")
-	defaultContentLanguage := viper.GetString("DefaultContentLanguage")
+	defaultContentInSubDir := viper.GetBool("defaultContentLanguageInSubdir")
+	defaultContentLanguage := viper.GetString("defaultContentLanguage")
 
 	languagePrefix := ""
 	if s.multilingualEnabled() && (defaultContentInSubDir || lang.Lang != defaultContentLanguage) {
@@ -948,22 +948,22 @@
 	}
 
 	s.Info = SiteInfo{
-		BaseURL:                        template.URL(helpers.SanitizeURLKeepTrailingSlash(viper.GetString("BaseURL"))),
-		Title:                          lang.GetString("Title"),
+		BaseURL:                        template.URL(helpers.SanitizeURLKeepTrailingSlash(viper.GetString("baseURL"))),
+		Title:                          lang.GetString("title"),
 		Author:                         lang.GetStringMap("author"),
 		Social:                         lang.GetStringMapString("social"),
-		LanguageCode:                   lang.GetString("languagecode"),
+		LanguageCode:                   lang.GetString("languageCode"),
 		Copyright:                      lang.GetString("copyright"),
-		DisqusShortname:                lang.GetString("DisqusShortname"),
+		DisqusShortname:                lang.GetString("disqusShortname"),
 		multilingual:                   multilingual,
 		Language:                       lang,
 		LanguagePrefix:                 languagePrefix,
 		Languages:                      languages,
 		defaultContentLanguageInSubdir: defaultContentInSubDir,
-		GoogleAnalytics:                lang.GetString("GoogleAnalytics"),
-		BuildDrafts:                    viper.GetBool("BuildDrafts"),
-		canonifyURLs:                   viper.GetBool("CanonifyURLs"),
-		preserveTaxonomyNames:          lang.GetBool("PreserveTaxonomyNames"),
+		GoogleAnalytics:                lang.GetString("googleAnalytics"),
+		BuildDrafts:                    viper.GetBool("buildDrafts"),
+		canonifyURLs:                   viper.GetBool("canonifyURLs"),
+		preserveTaxonomyNames:          lang.GetBool("preserveTaxonomyNames"),
 		AllPages:                       &s.AllPages,
 		Pages:                          &s.Pages,
 		rawAllPages:                    &s.rawAllPages,
@@ -984,7 +984,7 @@
 }
 
 func (s *Site) dataDir() string {
-	return viper.GetString("DataDir")
+	return viper.GetString("dataDir")
 }
 func (s *Site) absDataDir() string {
 	return helpers.AbsPathify(s.dataDir())
@@ -991,7 +991,7 @@
 }
 
 func (s *Site) i18nDir() string {
-	return viper.GetString("I18nDir")
+	return viper.GetString("i18nDir")
 }
 
 func (s *Site) absI18nDir() string {
@@ -1043,7 +1043,7 @@
 }
 
 func (s *Site) layoutDir() string {
-	return viper.GetString("LayoutDir")
+	return viper.GetString("layoutDir")
 }
 
 func (s *Site) absLayoutDir() string {
@@ -1069,7 +1069,7 @@
 }
 
 func (s *Site) absContentDir() string {
-	return helpers.AbsPathify(viper.GetString("ContentDir"))
+	return helpers.AbsPathify(viper.GetString("contentDir"))
 }
 
 func (s *Site) isContentDirEvent(e fsnotify.Event) bool {
@@ -1105,7 +1105,7 @@
 }
 
 func (s *Site) absPublishDir() string {
-	return helpers.AbsPathify(viper.GetString("PublishDir"))
+	return helpers.AbsPathify(viper.GetString("publishDir"))
 }
 
 func (s *Site) checkDirectories() (err error) {
@@ -1756,7 +1756,7 @@
 
 	go errorCollator(results, errs)
 
-	taxonomies := s.Language.GetStringMapString("Taxonomies")
+	taxonomies := s.Language.GetStringMapString("taxonomies")
 	for singular, plural := range taxonomies {
 		for key, pages := range s.Taxonomies[plural] {
 			taxes <- taxRenderInfo{key, pages, singular, plural}
@@ -1832,7 +1832,7 @@
 			[]string{"taxonomy/" + t.singular + ".html", "indexes/" + t.singular + ".html", "_default/taxonomy.html", "_default/list.html"})
 
 		dest := base
-		if viper.GetBool("UglyURLs") {
+		if viper.GetBool("uglyURLs") {
 			dest = helpers.Uglify(baseWithLanguagePrefix + ".html")
 		} else {
 			dest = helpers.PrettifyPath(baseWithLanguagePrefix + "/index.html")
@@ -1880,16 +1880,16 @@
 			continue
 		}
 
-		if !viper.GetBool("DisableRSS") {
+		if !viper.GetBool("disableRSS") {
 			// XML Feed
 			rssNode := s.newNode(fmt.Sprintf("%s-%s-rss", t.plural, t.key))
-			rssuri := viper.GetString("RSSUri")
-			s.setURLs(rssNode, base+"/"+rssuri)
+			rssURI := viper.GetString("rssURI")
+			s.setURLs(rssNode, base+"/"+rssURI)
 			rssNode.Data = n.Data
 
 			rssLayouts := []string{"taxonomy/" + t.singular + ".rss.xml", "_default/rss.xml", "rss.xml", "_internal/_default/rss.xml"}
 
-			if err := s.renderAndWriteXML("taxonomy "+t.singular+" rss", baseWithLanguagePrefix+"/"+rssuri, rssNode, s.appendThemeTemplates(rssLayouts)...); err != nil {
+			if err := s.renderAndWriteXML("taxonomy "+t.singular+" rss", baseWithLanguagePrefix+"/"+rssURI, rssNode, s.appendThemeTemplates(rssLayouts)...); err != nil {
 				results <- err
 				continue
 			}
@@ -1936,7 +1936,7 @@
 	}
 
 	sectionName = helpers.FirstUpper(sectionName)
-	if viper.GetBool("PluralizeListTitles") {
+	if viper.GetBool("pluralizeListTitles") {
 		n.Title = inflect.Pluralize(sectionName)
 	} else {
 		n.Title = sectionName
@@ -2012,13 +2012,13 @@
 			return nil
 		}
 
-		if !viper.GetBool("DisableRSS") && section != "" {
+		if !viper.GetBool("disableRSS") && section != "" {
 			// XML Feed
-			rssuri := viper.GetString("RSSUri")
+			rssURI := viper.GetString("rssURI")
 			rssNode := s.newSectionListNode(true, sectionName+"-rss", section, data, 0)
-			s.setURLs(rssNode, section+"/"+rssuri)
+			s.setURLs(rssNode, section+"/"+rssURI)
 			rssLayouts := []string{"section/" + section + ".rss.xml", "_default/rss.xml", "rss.xml", "_internal/_default/rss.xml"}
-			if err := s.renderAndWriteXML("section "+section+" rss", rssNode.addLangPathPrefix(section+"/"+rssuri), rssNode, s.appendThemeTemplates(rssLayouts)...); err != nil {
+			if err := s.renderAndWriteXML("section "+section+" rss", rssNode.addLangPathPrefix(section+"/"+rssURI), rssNode, s.appendThemeTemplates(rssLayouts)...); err != nil {
 				return err
 			}
 		}
@@ -2076,10 +2076,10 @@
 		}
 	}
 
-	if !viper.GetBool("DisableRSS") {
+	if !viper.GetBool("disableRSS") {
 		// XML Feed
 		rssNode := s.newNode("rss-home")
-		s.setURLs(rssNode, viper.GetString("RSSUri"))
+		s.setURLs(rssNode, viper.GetString("rssURI"))
 		rssNode.Title = ""
 		high := 50
 		if len(s.Pages) < high {
@@ -2093,12 +2093,12 @@
 
 		rssLayouts := []string{"rss.xml", "_default/rss.xml", "_internal/_default/rss.xml"}
 
-		if err := s.renderAndWriteXML("homepage rss", rssNode.addLangPathPrefix(viper.GetString("RSSUri")), rssNode, s.appendThemeTemplates(rssLayouts)...); err != nil {
+		if err := s.renderAndWriteXML("homepage rss", rssNode.addLangPathPrefix(viper.GetString("rssURI")), rssNode, s.appendThemeTemplates(rssLayouts)...); err != nil {
 			return err
 		}
 	}
 
-	if viper.GetBool("Disable404") {
+	if viper.GetBool("disable404") {
 		return nil
 	}
 
@@ -2138,11 +2138,11 @@
 }
 
 func (s *Site) renderSitemap() error {
-	if viper.GetBool("DisableSitemap") {
+	if viper.GetBool("disableSitemap") {
 		return nil
 	}
 
-	sitemapDefault := parseSitemap(viper.GetStringMap("Sitemap"))
+	sitemapDefault := parseSitemap(viper.GetStringMap("sitemap"))
 
 	n := s.newNode("sitemap")
 
@@ -2183,7 +2183,7 @@
 }
 
 func (s *Site) renderRobotsTXT() error {
-	if !viper.GetBool("EnableRobotsTXT") {
+	if !viper.GetBool("enableRobotsTXT") {
 		return nil
 	}
 
@@ -2232,7 +2232,7 @@
 
 func (s *SiteInfo) permalinkStr(plink string) string {
 	return helpers.MakePermalink(
-		viper.GetString("BaseURL"),
+		viper.GetString("baseURL"),
 		s.pathSpec.URLizeAndPrep(plink)).String()
 }
 
@@ -2323,10 +2323,10 @@
 	defer bp.PutBuffer(outBuffer)
 
 	var path []byte
-	if viper.GetBool("RelativeURLs") {
+	if viper.GetBool("relativeURLs") {
 		path = []byte(helpers.GetDottedRelativePath(dest))
 	} else {
-		s := viper.GetString("BaseURL")
+		s := viper.GetString("baseURL")
 		if !strings.HasSuffix(s, "/") {
 			s += "/"
 		}
@@ -2364,17 +2364,17 @@
 
 	transformLinks := transform.NewEmptyTransforms()
 
-	if viper.GetBool("RelativeURLs") || viper.GetBool("CanonifyURLs") {
+	if viper.GetBool("relativeURLs") || viper.GetBool("canonifyURLs") {
 		transformLinks = append(transformLinks, transform.AbsURL)
 	}
 
-	if s.running() && viper.GetBool("watch") && !viper.GetBool("DisableLiveReload") {
+	if s.running() && viper.GetBool("watch") && !viper.GetBool("disableLiveReload") {
 		transformLinks = append(transformLinks, transform.LiveReloadInject)
 	}
 
 	// For performance reasons we only inject the Hugo generator tag on the home page.
 	if n, ok := d.(*Node); ok && n.IsHome {
-		if !viper.GetBool("DisableHugoGeneratorInject") {
+		if !viper.GetBool("disableHugoGeneratorInject") {
 			transformLinks = append(transformLinks, transform.HugoGeneratorInject)
 		}
 	}
@@ -2381,14 +2381,14 @@
 
 	var path []byte
 
-	if viper.GetBool("RelativeURLs") {
+	if viper.GetBool("relativeURLs") {
 		translated, err := pageTarget.(target.OptionalTranslator).TranslateRelative(dest)
 		if err != nil {
 			return err
 		}
 		path = []byte(helpers.GetDottedRelativePath(translated))
-	} else if viper.GetBool("CanonifyURLs") {
-		s := viper.GetString("BaseURL")
+	} else if viper.GetBool("canonifyURLs") {
+		s := viper.GetString("baseURL")
 		if !strings.HasSuffix(s, "/") {
 			s += "/"
 		}
@@ -2403,7 +2403,7 @@
 		jww.WARN.Printf("%q is rendered empty\n", dest)
 		if dest == "/" {
 			debugAddend := ""
-			if !viper.GetBool("Verbose") {
+			if !viper.GetBool("verbose") {
 				debugAddend = "* For more debugging information, run \"hugo -v\""
 			}
 			distinctFeedbackLogger.Printf(`=============================================================
@@ -2413,7 +2413,7 @@
  %s
 =============================================================`,
 				filepath.Base(viper.ConfigFileUsed()),
-				viper.GetString("Theme"),
+				viper.GetString("theme"),
 				debugAddend)
 		}
 
@@ -2499,7 +2499,7 @@
 		if s.targets.page == nil {
 			s.targets.page = &target.PagePub{
 				PublishDir: s.absPublishDir(),
-				UglyURLs:   viper.GetBool("UglyURLs"),
+				UglyURLs:   viper.GetBool("uglyURLs"),
 			}
 		}
 		if s.targets.pageUgly == nil {
@@ -2544,9 +2544,9 @@
 }
 
 func (s *Site) publishDestAlias(aliasPublisher target.AliasPublisher, path, permalink string, p *Page) (err error) {
-	if viper.GetBool("RelativeURLs") {
+	if viper.GetBool("relativeURLs") {
 		// convert `permalink` into URI relative to location of `path`
-		baseURL := helpers.SanitizeURLKeepTrailingSlash(viper.GetString("BaseURL"))
+		baseURL := helpers.SanitizeURLKeepTrailingSlash(viper.GetString("baseURL"))
 		if strings.HasPrefix(permalink, baseURL) {
 			permalink = "/" + strings.TrimPrefix(permalink, baseURL)
 		}
@@ -2572,7 +2572,7 @@
 		msg = fmt.Sprintf("%d drafts rendered", s.draftCount)
 	}
 
-	if viper.GetBool("BuildDrafts") {
+	if viper.GetBool("buildDrafts") {
 		return fmt.Sprintf("%d of ", s.draftCount) + msg
 	}
 
@@ -2591,7 +2591,7 @@
 		msg = fmt.Sprintf("%d futures rendered", s.futureCount)
 	}
 
-	if viper.GetBool("BuildFuture") {
+	if viper.GetBool("buildFuture") {
 		return fmt.Sprintf("%d of ", s.futureCount) + msg
 	}
 
@@ -2610,7 +2610,7 @@
 		msg = fmt.Sprintf("%d expired rendered", s.expiredCount)
 	}
 
-	if viper.GetBool("BuildExpired") {
+	if viper.GetBool("buildExpired") {
 		return fmt.Sprintf("%d of ", s.expiredCount) + msg
 	}
 
--- a/hugolib/site_show_plan_test.go
+++ b/hugolib/site_show_plan_test.go
@@ -83,7 +83,7 @@
 func _TestFileTarget(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 
 	s := &Site{
 		Source: &source.InMemorySource{ByteSource: fakeSource},
@@ -104,8 +104,8 @@
 func _TestPageTargetUgly(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("DefaultExtension", "html")
-	viper.Set("UglyURLs", true)
+	viper.Set("defaultExtension", "html")
+	viper.Set("uglyURLs", true)
 
 	s := &Site{
 		targets:  targetList{page: &target.PagePub{UglyURLs: true, PublishDir: "public"}},
@@ -129,7 +129,7 @@
 func _TestFileTargetPublishDir(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 
 	s := &Site{
 
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -56,9 +56,9 @@
 func TestReadPagesFromSourceWithEmptySource(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 	viper.Set("verbose", true)
-	viper.Set("baseurl", "http://auth/bub")
+	viper.Set("baseURL", "http://auth/bub")
 
 	sources := []source.ByteSource{}
 
@@ -143,7 +143,7 @@
 		return s
 	}
 
-	viper.Set("baseurl", "http://auth/bub")
+	viper.Set("baseURL", "http://auth/bub")
 
 	// Testing Defaults.. Only draft:true and publishDate in the past should be rendered
 	s := siteSetup(t)
@@ -152,7 +152,7 @@
 	}
 
 	// only publishDate in the past should be rendered
-	viper.Set("BuildDrafts", true)
+	viper.Set("buildDrafts", true)
 	s = siteSetup(t)
 	if len(s.AllPages) != 2 {
 		t.Fatal("Future Dated Posts published unexpectedly")
@@ -159,8 +159,8 @@
 	}
 
 	//  drafts should not be rendered, but all dates should
-	viper.Set("BuildDrafts", false)
-	viper.Set("BuildFuture", true)
+	viper.Set("buildDrafts", false)
+	viper.Set("buildFuture", true)
 	s = siteSetup(t)
 	if len(s.AllPages) != 2 {
 		t.Fatal("Draft posts published unexpectedly")
@@ -167,8 +167,8 @@
 	}
 
 	// all 4 should be included
-	viper.Set("BuildDrafts", true)
-	viper.Set("BuildFuture", true)
+	viper.Set("buildDrafts", true)
+	viper.Set("buildFuture", true)
 	s = siteSetup(t)
 	if len(s.AllPages) != 4 {
 		t.Fatal("Drafts or Future posts not included as expected")
@@ -175,8 +175,8 @@
 	}
 
 	//setting defaults back
-	viper.Set("BuildDrafts", false)
-	viper.Set("BuildFuture", false)
+	viper.Set("buildDrafts", false)
+	viper.Set("buildFuture", false)
 }
 
 func TestFutureExpirationRender(t *testing.T) {
@@ -201,7 +201,7 @@
 		return s
 	}
 
-	viper.Set("baseurl", "http://auth/bub")
+	viper.Set("baseURL", "http://auth/bub")
 
 	s := siteSetup(t)
 
@@ -233,9 +233,9 @@
 	testCommonResetState()
 
 	baseURL := "http://foo/bar"
-	viper.Set("DefaultExtension", "html")
-	viper.Set("baseurl", baseURL)
-	viper.Set("UglyURLs", uglyURLs)
+	viper.Set("defaultExtension", "html")
+	viper.Set("baseURL", baseURL)
+	viper.Set("uglyURLs", uglyURLs)
 	viper.Set("verbose", true)
 
 	var refShortcode string
@@ -267,7 +267,7 @@
 		// Issue #1148: Make sure that no P-tags is added around shortcodes.
 		{
 			Name: filepath.FromSlash("sect/doc2.md"),
-			Content: []byte(fmt.Sprintf(`**Ref 1:** 
+			Content: []byte(fmt.Sprintf(`**Ref 1:**
 
 {{< %s "sect/doc1.md" >}}
 
@@ -330,18 +330,18 @@
 func doTestShouldAlwaysHaveUglyURLs(t *testing.T, uglyURLs bool) {
 	testCommonResetState()
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 	viper.Set("verbose", true)
-	viper.Set("baseurl", "http://auth/bub")
-	viper.Set("DisableSitemap", false)
-	viper.Set("DisableRSS", false)
-	viper.Set("RSSUri", "index.xml")
+	viper.Set("baseURL", "http://auth/bub")
+	viper.Set("disableSitemap", false)
+	viper.Set("disableRSS", false)
+	viper.Set("rssURI", "index.xml")
 	viper.Set("blackfriday",
 		// TODO(bep) https://github.com/spf13/viper/issues/261
 		map[string]interface{}{
 			strings.ToLower("plainIDAnchors"): true})
 
-	viper.Set("UglyURLs", uglyURLs)
+	viper.Set("uglyURLs", uglyURLs)
 
 	sources := []source.ByteSource{
 		{Name: filepath.FromSlash("sect/doc1.md"), Content: []byte("---\nmarkup: markdown\n---\n# title\nsome *content*")},
@@ -413,11 +413,11 @@
 	hugofs.InitMemFs()
 	testCommonResetState()
 
-	viper.Set("baseurl", "http://auth/sub/")
-	viper.Set("DefaultExtension", "html")
-	viper.Set("UglyURLs", uglify)
-	viper.Set("PluralizeListTitles", pluralize)
-	viper.Set("CanonifyURLs", canonify)
+	viper.Set("baseURL", "http://auth/sub/")
+	viper.Set("defaultExtension", "html")
+	viper.Set("uglyURLs", uglify)
+	viper.Set("pluralizeListTitles", pluralize)
+	viper.Set("canonifyURLs", canonify)
 
 	var expectedPathSuffix string
 
@@ -491,10 +491,10 @@
 		{Name: filepath.FromSlash("sect/doc8.html"), Content: []byte("---\nmarkup: md\n---\n# title\nsome *content*")},
 	}
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 	viper.Set("verbose", true)
-	viper.Set("CanonifyURLs", true)
-	viper.Set("baseurl", "http://auth/bub")
+	viper.Set("canonifyURLs", true)
+	viper.Set("baseURL", "http://auth/bub")
 	s := &Site{
 		Source:   &source.InMemorySource{ByteSource: sources},
 		targets:  targetList{page: &target.PagePub{UglyURLs: true}},
@@ -539,7 +539,7 @@
 func TestAbsURLify(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("DefaultExtension", "html")
+	viper.Set("defaultExtension", "html")
 
 	hugofs.InitMemFs()
 	sources := []source.ByteSource{
@@ -548,14 +548,14 @@
 	}
 	for _, baseURL := range []string{"http://auth/bub", "http://base", "//base"} {
 		for _, canonify := range []bool{true, false} {
-			viper.Set("CanonifyURLs", canonify)
-			viper.Set("BaseURL", baseURL)
+			viper.Set("canonifyURLs", canonify)
+			viper.Set("baseURL", baseURL)
 			s := &Site{
 				Source:   &source.InMemorySource{ByteSource: sources},
 				targets:  targetList{page: &target.PagePub{UglyURLs: true}},
 				Language: helpers.NewDefaultLanguage(),
 			}
-			t.Logf("Rendering with BaseURL %q and CanonifyURLs set %v", viper.GetString("baseURL"), canonify)
+			t.Logf("Rendering with baseURL %q and canonifyURLs set %v", viper.GetString("baseURL"), canonify)
 
 			if err := buildAndRenderSite(s, "blue/single.html", templateWithURLAbs); err != nil {
 				t.Fatalf("Failed to build site: %s", err)
@@ -644,7 +644,7 @@
 
 	hugofs.InitMemFs()
 
-	viper.Set("baseurl", "http://auth/bub")
+	viper.Set("baseURL", "http://auth/bub")
 	s := &Site{
 		Source:   &source.InMemorySource{ByteSource: weightedSources},
 		Language: helpers.NewDefaultLanguage(),
@@ -713,7 +713,7 @@
 
 	hugofs.InitMemFs()
 
-	viper.Set("baseurl", "http://auth/bub")
+	viper.Set("baseURL", "http://auth/bub")
 	s := &Site{
 		Source:   &source.InMemorySource{ByteSource: groupedSources},
 		Language: helpers.NewDefaultLanguage(),
@@ -897,7 +897,7 @@
 	taxonomies["tag"] = "tags"
 	taxonomies["category"] = "categories"
 
-	viper.Set("baseurl", "http://auth/bub")
+	viper.Set("baseURL", "http://auth/bub")
 	viper.Set("taxonomies", taxonomies)
 	s := &Site{
 		Source:   &source.InMemorySource{ByteSource: sources},
@@ -959,11 +959,11 @@
 		{Name: filepath.FromSlash("level2/level3/common.png"), Content: []byte("")},
 	}
 
-	viper.Set("baseurl", "http://auth/")
-	viper.Set("DefaultExtension", "html")
-	viper.Set("UglyURLs", false)
-	viper.Set("PluralizeListTitles", false)
-	viper.Set("CanonifyURLs", false)
+	viper.Set("baseURL", "http://auth/")
+	viper.Set("defaultExtension", "html")
+	viper.Set("uglyURLs", false)
+	viper.Set("pluralizeListTitles", false)
+	viper.Set("canonifyURLs", false)
 	viper.Set("blackfriday",
 		// TODO(bep) see https://github.com/spf13/viper/issues/261
 		map[string]interface{}{
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -61,7 +61,7 @@
 		{"http://base.com/sub", "http://base.com/sub"},
 		{"http://base.com", "http://base.com"}} {
 
-		viper.Set("BaseURL", this.in)
+		viper.Set("baseURL", this.in)
 		s := newSiteDefaultLang()
 		s.initializeSiteInfo()
 
@@ -76,7 +76,7 @@
 	testCommonResetState()
 	hugofs.InitMemFs()
 
-	viper.Set("uglyurls", false)
+	viper.Set("uglyURLs", false)
 	viper.Set("paginate", 10)
 	s := &Site{
 		Source:   &source.InMemorySource{ByteSource: urlFakeSource},
--- a/hugolib/sitemap_test.go
+++ b/hugolib/sitemap_test.go
@@ -38,7 +38,7 @@
 func TestSitemapOutput(t *testing.T) {
 	testCommonResetState()
 
-	viper.Set("baseurl", "http://auth/bub/")
+	viper.Set("baseURL", "http://auth/bub/")
 
 	s := &Site{
 		Source:   &source.InMemorySource{ByteSource: weightedSources},
--- a/source/file.go
+++ b/source/file.go
@@ -128,7 +128,7 @@
 
 	f.lang = strings.TrimPrefix(filepath.Ext(f.baseName), ".")
 	if f.lang == "" {
-		f.lang = viper.GetString("DefaultContentLanguage")
+		f.lang = viper.GetString("defaultContentLanguage")
 	}
 	f.translationBaseName = helpers.Filename(f.baseName)
 
--- a/source/filesystem.go
+++ b/source/filesystem.go
@@ -159,7 +159,7 @@
 		strings.HasSuffix(base, "~") {
 		return true
 	}
-	ignoreFiles := viper.GetStringSlice("IgnoreFiles")
+	ignoreFiles := viper.GetStringSlice("ignoreFiles")
 	if len(ignoreFiles) > 0 {
 		for _, ignorePattern := range ignoreFiles {
 			match, err := regexp.MatchString(ignorePattern, filePath)
--- a/tpl/template_funcs.go
+++ b/tpl/template_funcs.go
@@ -1278,7 +1278,7 @@
 		return "", err
 	}
 
-	language := viper.Get("CurrentContentLanguage").(*helpers.Language)
+	language := viper.Get("currentContentLanguage").(*helpers.Language)
 
 	m := helpers.RenderBytes(&helpers.RenderingContext{
 		ConfigProvider: language,
--- a/tpl/template_funcs_test.go
+++ b/tpl/template_funcs_test.go
@@ -75,9 +75,9 @@
 
 	workingDir := "/home/hugo"
 
-	viper.Set("WorkingDir", workingDir)
-	viper.Set("CurrentContentLanguage", helpers.NewDefaultLanguage())
-	viper.Set("Multilingual", true)
+	viper.Set("workingDir", workingDir)
+	viper.Set("currentContentLanguage", helpers.NewDefaultLanguage())
+	viper.Set("multilingual", true)
 
 	fs := &afero.MemMapFs{}
 	hugofs.InitFs(fs)
@@ -1773,7 +1773,7 @@
 }
 
 func TestMarkdownify(t *testing.T) {
-	viper.Set("CurrentContentLanguage", helpers.NewDefaultLanguage())
+	viper.Set("currentContentLanguage", helpers.NewDefaultLanguage())
 
 	for i, this := range []struct {
 		in     interface{}
@@ -2444,7 +2444,7 @@
 
 	workingDir := "/home/hugo"
 
-	viper.Set("WorkingDir", workingDir)
+	viper.Set("workingDir", workingDir)
 
 	fs := &afero.MemMapFs{}
 	hugofs.InitFs(fs)
--- a/tpl/template_i18n.go
+++ b/tpl/template_i18n.go
@@ -44,7 +44,7 @@
 		translator.current = f
 	} else {
 		jww.WARN.Printf("Translation func for language %v not found, use default.", language.Lang)
-		translator.current = translator.translateFuncs[viper.GetString("DefaultContentLanguage")]
+		translator.current = translator.translateFuncs[viper.GetString("defaultContentLanguage")]
 	}
 	return nil
 }
@@ -51,7 +51,7 @@
 
 func SetI18nTfuncs(bndl *bundle.Bundle) {
 	translator = &translate{translateFuncs: make(map[string]bundle.TranslateFunc)}
-	defaultContentLanguage := viper.GetString("DefaultContentLanguage")
+	defaultContentLanguage := viper.GetString("defaultContentLanguage")
 	var (
 		defaultT bundle.TranslateFunc
 		err      error
@@ -76,7 +76,7 @@
 			if Logi18nWarnings {
 				i18nWarningLogger.Printf("i18n|MISSING_TRANSLATION|%s|%s", currentLang, translationID)
 			}
-			if viper.GetBool("EnableMissingTranslationPlaceholders") {
+			if viper.GetBool("enableMissingTranslationPlaceholders") {
 				return fmt.Sprintf("[i18n] %s", translationID)
 			}
 			if defaultT != nil {
--- a/tpl/template_i18n_test.go
+++ b/tpl/template_i18n_test.go
@@ -129,12 +129,12 @@
 func TestI18nTranslate(t *testing.T) {
 	var actual, expected string
 
-	viper.SetDefault("DefaultContentLanguage", "en")
-	viper.Set("CurrentContentLanguage", helpers.NewLanguage("en"))
+	viper.SetDefault("defaultContentLanguage", "en")
+	viper.Set("currentContentLanguage", helpers.NewLanguage("en"))
 
 	// Test without and with placeholders
 	for _, enablePlaceholders := range []bool{false, true} {
-		viper.Set("EnableMissingTranslationPlaceholders", enablePlaceholders)
+		viper.Set("enableMissingTranslationPlaceholders", enablePlaceholders)
 
 		for _, test := range i18nTests {
 			if enablePlaceholders {
--- a/tpl/template_resources.go
+++ b/tpl/template_resources.go
@@ -65,7 +65,7 @@
 
 // getCacheFileID returns the cache ID for a string
 func getCacheFileID(id string) string {
-	return viper.GetString("CacheDir") + url.QueryEscape(id)
+	return viper.GetString("cacheDir") + url.QueryEscape(id)
 }
 
 // resGetCache returns the content for an ID from the file cache or an error
@@ -115,7 +115,7 @@
 // resGetRemote loads the content of a remote file. This method is thread safe.
 func resGetRemote(url string, fs afero.Fs, hc *http.Client) ([]byte, error) {
 
-	c, err := resGetCache(url, fs, viper.GetBool("IgnoreCache"))
+	c, err := resGetCache(url, fs, viper.GetBool("ignoreCache"))
 	if c != nil && err == nil {
 		return c, nil
 	}
@@ -128,7 +128,7 @@
 	defer func() { remoteURLLock.URLUnlock(url) }()
 
 	// avoid multiple locks due to calling resGetCache twice
-	c, err = resGetCache(url, fs, viper.GetBool("IgnoreCache"))
+	c, err = resGetCache(url, fs, viper.GetBool("ignoreCache"))
 	if c != nil && err == nil {
 		return c, nil
 	}
@@ -146,7 +146,7 @@
 	if err != nil {
 		return nil, err
 	}
-	err = resWriteCache(url, c, fs, viper.GetBool("IgnoreCache"))
+	err = resWriteCache(url, c, fs, viper.GetBool("ignoreCache"))
 	if err != nil {
 		return nil, err
 	}
@@ -156,7 +156,7 @@
 
 // resGetLocal loads the content of a local file
 func resGetLocal(url string, fs afero.Fs) ([]byte, error) {
-	filename := filepath.Join(viper.GetString("WorkingDir"), url)
+	filename := filepath.Join(viper.GetString("workingDir"), url)
 	if e, err := helpers.Exists(filename, fs); !e {
 		return nil, err
 	}
--- a/tpl/template_resources_test.go
+++ b/tpl/template_resources_test.go
@@ -213,12 +213,12 @@
 }
 
 func testRetryWhenDone() wd {
-	cd := viper.GetString("CacheDir")
-	viper.Set("CacheDir", helpers.GetTempDir("", hugofs.Source()))
+	cd := viper.GetString("cacheDir")
+	viper.Set("cacheDir", helpers.GetTempDir("", hugofs.Source()))
 	var tmpSleep time.Duration
 	tmpSleep, resSleep = resSleep, time.Millisecond
 	return wd{func() {
-		viper.Set("CacheDir", cd)
+		viper.Set("cacheDir", cd)
 		resSleep = tmpSleep
 	}}
 }