diff --git a/content/templates/rss.md b/content/templates/rss.md index f68a2e104..4e69185ff 100644 --- a/content/templates/rss.md +++ b/content/templates/rss.md @@ -114,26 +114,24 @@ Hugo will automatically add the following header line to this file on render. Pl ## Reference your RSS Feed in `
` -In your `header.html` template, you can specify your RSS feed in your `` tag like this: +In your `header.html` template, you can specify your RSS feed in your `` tag using Hugo's [Output Formats][Output Formats] like this: ``` -{{ if .RSSLink }} - - -{{ end }} +{{ range .AlternativeOutputFormats -}} + +{{ end -}} ``` -...with the auto-discovery link specified by the line with `rel="alternate"`. - -The `.RSSLink` will render the appropriate RSS feed URL for the section, whether it's everything, posts in a section, or a taxonomy. - -If you reference your RSS link, be sure to specify the MIME type with `type="application/rss+xml"`. +If you only want the RSS link, you can query the formats: ``` -{{ .SomeText }} +{{ with .OutputFormats.Get "rss" -}} + +{{ end -} ``` - + [config]: /getting-started/configuration/ [embedded]: #the-embedded-rss-xml [RSS 2.0]: http://cyber.law.harvard.edu/rss/rss.html "RSS 2.0 Specification" [section]: /content-management/sections/ +[Output Formats]: /templates/output-formats/#link-to-output-formats \ No newline at end of file