Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'

This commit is contained in:
Bjørn Erik Pedersen
2024-06-21 09:41:24 +02:00
475 changed files with 7408 additions and 4720 deletions

View File

@@ -1,6 +1,6 @@
---
title: RSS templates
description: Use the built-in RSS template, or create your own.
description: Use the embedded RSS template, or create your own.
categories: [templates]
keywords: [rss,xml,templates]
menu:
@@ -25,6 +25,8 @@ term = ['html']
To disable feed generation for all [page kinds]:
[page kinds]: /getting-started/glossary/#page-kind
{{< code-toggle file=hugo >}}
disableKinds = ['rss']
{{< /code-toggle >}}
@@ -65,7 +67,10 @@ Hugo will render this to:
## Custom templates
Override Hugo's [built-in RSS template] by creating one or more of your own, following the naming conventions as shown in the [template lookup order table].
Override Hugo's [embedded RSS template] by creating one or more of your own, following the naming conventions as shown in the [template lookup order].
[embedded RSS template]: {{% eturl rss %}}
[template lookup order]: #template-lookup-order
For example, to use different templates for home, section, taxonomy, and term pages:
@@ -80,10 +85,6 @@ layouts/
RSS templates receive the `.Page` and `.Site` objects in context.
[built-in RSS template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml
[page kinds]: /getting-started/glossary/#page-kind
[template lookup order table]: #template-lookup-order
## Template lookup order
The table below shows the RSS template lookup order for the different page kinds. The first listing shows the lookup order when running with a theme (`demoTheme`).