mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Change the type of .Site.Author from…
…`map[string]string` to `map[string]interface{}`. This allows values other than `string` values to be saved to Author, such as: ```toml # config.toml … [Author] name = "Austin Ziegler" social-site = [ "Facebook", "Twitter", "GitHub" ] ``` My specific use-case is that I’m trying to make something work similar whether it’s specified in `.Params.Author` or in `.Site.Author` without introducing `.Site.Params.Author`.
This commit is contained in:
parent
f3e9cbc7bd
commit
8cc7684a91
1 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ type SiteInfo struct {
|
|||
Recent *Pages // legacy, should be identical to Pages
|
||||
Menus *Menus
|
||||
Title string
|
||||
Author map[string]string
|
||||
Author map[string]interface{}
|
||||
LanguageCode string
|
||||
DisqusShortname string
|
||||
Copyright string
|
||||
|
@ -279,7 +279,7 @@ func (s *Site) initializeSiteInfo() {
|
|||
s.Info = SiteInfo{
|
||||
BaseUrl: template.URL(helpers.SanitizeUrl(viper.GetString("BaseUrl"))),
|
||||
Title: viper.GetString("Title"),
|
||||
Author: viper.GetStringMapString("author"),
|
||||
Author: viper.GetStringMap("author"),
|
||||
LanguageCode: viper.GetString("languagecode"),
|
||||
Copyright: viper.GetString("copyright"),
|
||||
DisqusShortname: viper.GetString("DisqusShortname"),
|
||||
|
|
Loading…
Reference in a new issue