shithub: hugo

Download patch

ref: 3abb2675c5afa3c31119dcb09a9143c87b85eda6
parent: afbd52f78e20892073a29dbe9c4a4dec75b4ddac
author: Cameron Moore <[email protected]>
date: Tue Nov 10 16:31:52 EST 2015

Add RSSLink to SiteInfo

--- a/docs/content/templates/variables.md
+++ b/docs/content/templates/variables.md
@@ -111,6 +111,7 @@
 Also available is `.Site` which has the following:
 
 **.Site.BaseURL** The base URL for the site as defined in the site configuration file.<br>
+**.Site.RSSLink** The URL for the site RSS.<br>
 **.Site.Taxonomies** The [taxonomies](/taxonomies/usage/) for the entire site.  Replaces the now-obsolete `.Site.Indexes` since v0.11.<br>
 **.Site.Pages** Array of all content ordered by Date, newest first.  Replaces the now-deprecated `.Site.Recent` starting v0.13.<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:
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -103,6 +103,7 @@
 	Menus                 *Menus
 	Hugo                  *HugoInfo
 	Title                 string
+	RSSLink               string
 	Author                map[string]interface{}
 	LanguageCode          string
 	DisqusShortname       string
@@ -458,6 +459,7 @@
 		Copyright:             viper.GetString("copyright"),
 		DisqusShortname:       viper.GetString("DisqusShortname"),
 		GoogleAnalytics:       viper.GetString("GoogleAnalytics"),
+		RSSLink:               s.permalinkStr(viper.GetString("RSSUri")),
 		BuildDrafts:           viper.GetBool("BuildDrafts"),
 		canonifyURLs:          viper.GetBool("CanonifyURLs"),
 		preserveTaxonomyNames: viper.GetBool("PreserveTaxonomyNames"),