Add more information to the siteInfo (and configuration options) for better RSS gener...
authorspf13 <steve.francia@gmail.com>
Wed, 9 Apr 2014 21:15:52 +0000 (17:15 -0400)
committerspf13 <steve.francia@gmail.com>
Wed, 9 Apr 2014 21:15:52 +0000 (17:15 -0400)
hugolib/site.go

index 7d165393260fb0d10c8c2d223535f470cb063173..c8fc8893ba0e9aed6474c88e6150e7c78532357a 100644 (file)
@@ -72,15 +72,19 @@ type Site struct {
 }
 
 type SiteInfo struct {
-       BaseUrl    template.URL
-       Taxonomies TaxonomyList
-       Indexes    *TaxonomyList // legacy, should be identical to Taxonomies
-       Recent     *Pages
-       LastChange time.Time
-       Title      string
-       ConfigGet  func(key string) interface{}
-       Permalinks PermalinkOverrides
-       Params     map[string]interface{}
+       BaseUrl      template.URL
+       Taxonomies   TaxonomyList
+       Indexes      *TaxonomyList // legacy, should be identical to Taxonomies
+       Recent       *Pages
+       Title        string
+       Author       string
+       AuthorEmail  string
+       LanguageCode string
+       Copyright    string
+       LastChange   time.Time
+       ConfigGet    func(key string) interface{}
+       Permalinks   PermalinkOverrides
+       Params       map[string]interface{}
 }
 
 type runmode struct {
@@ -228,11 +232,15 @@ func (s *Site) initializeSiteInfo() {
        }
 
        s.Info = SiteInfo{
-               BaseUrl:    template.URL(helpers.SanitizeUrl(viper.GetString("BaseUrl"))),
-               Title:      viper.GetString("Title"),
-               Recent:     &s.Pages,
-               Params:     params,
-               Permalinks: permalinks,
+               BaseUrl:      template.URL(helpers.SanitizeUrl(viper.GetString("BaseUrl"))),
+               Title:        viper.GetString("Title"),
+               Author:       viper.GetString("author"),
+               AuthorEmail:  viper.GetString("authoremail"),
+               LanguageCode: viper.GetString("languagecode"),
+               Copyright:    viper.GetString("copyright"),
+               Recent:       &s.Pages,
+               Params:       params,
+               Permalinks:   permalinks,
        }
 }