How to access the "top level" .RSSlink from a post?

So my theme has an RSS section that just spits out .RSSlink in the href property. However, this obviously doesn’t work for posts since they don’t haven an rss file.

I’d really like to just always use the toplevel “root” RSSlink no matter what page is being generated, but I can’t figure out how to access it . I thought $.RSSlink would do it, but no dice. I ended up just hardcoding it to {{.Site.BaseURL}}index.xml but that seems a bit sketchy. Is there a better way?

The way you’ve solved it is probably the only way to do it. The root/homepage Node has an RSSLink, but I don’t know how you would get at that from any normal Page.

What we really need is the main RSSLink to be a part of the SiteInfo.

Created a pull request to add this feature. We’ll see if it gets merged.

1 Like

My pull request was merged. This feature should be in the upcoming 0.15 release.