From: Bjørn Erik Pedersen Date: Fri, 12 Aug 2016 08:12:01 +0000 (+0200) Subject: Small adjustment to SiteInfo init X-Git-Tag: v0.17~111 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=28696b5d;p=brevno-suite%2Fhugo Small adjustment to SiteInfo init After a visual inspection to make (pretty) sure it is correct re multiple languages. Updates #2309 --- diff --git a/helpers/language.go b/helpers/language.go index 99412930..a64809f9 100644 --- a/helpers/language.go +++ b/helpers/language.go @@ -83,7 +83,10 @@ func (l *Language) SetParam(k string, v interface{}) { l.params[k] = v } +func (l *Language) GetBool(key string) bool { return cast.ToBool(l.Get(key)) } + func (l *Language) GetString(key string) string { return cast.ToString(l.Get(key)) } + func (ml *Language) GetStringMap(key string) map[string]interface{} { return cast.ToStringMap(ml.Get(key)) } diff --git a/hugolib/site.go b/hugolib/site.go index aa89b692..dd020f75 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -909,10 +909,10 @@ func (s *Site) initializeSiteInfo() { Languages: languages, defaultContentLanguageInSubdir: defaultContentInSubDir, GoogleAnalytics: lang.GetString("GoogleAnalytics"), - RSSLink: permalinkStr(viper.GetString("RSSUri")), + RSSLink: permalinkStr(lang.GetString("RSSUri")), BuildDrafts: viper.GetBool("BuildDrafts"), canonifyURLs: viper.GetBool("CanonifyURLs"), - preserveTaxonomyNames: viper.GetBool("PreserveTaxonomyNames"), + preserveTaxonomyNames: lang.GetBool("PreserveTaxonomyNames"), AllPages: &s.AllPages, Pages: &s.Pages, rawAllPages: &s.rawAllPages,