shithub: hugo

Download patch

ref: bb9bcdcf305dd4c1ffcb8efb7cca544300099189
parent: 93bcddebb3030705dcb643dffb65890a270b5182
author: spf13 <[email protected]>
date: Wed Apr 9 13:15:52 EDT 2014

Add more information to the siteInfo (and configuration options) for better RSS generation.

--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -72,15 +72,19 @@
 }
 
 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 @@
 	}
 
 	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,
 	}
 }