mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
Merge commit '35febb2e2a3780c3338a2665fddea7dda28a17f4'
This commit is contained in:
@@ -58,6 +58,7 @@ copyright = "This work is licensed under a Creative Commons Attribution-ShareAli
|
||||
This is the default RSS template that ships with Hugo. It adheres to the [RSS 2.0 Specification][RSS 2.0].
|
||||
|
||||
```xml
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
@@ -86,13 +87,6 @@ This is the default RSS template that ships with Hugo. It adheres to the [RSS 2.
|
||||
</rss>
|
||||
```
|
||||
|
||||
{{% warning "XML Header" %}}
|
||||
Hugo will automatically add the following header line to this file on render. Please do *not* include this in the template as it's not valid HTML.
|
||||
```
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
```
|
||||
{{% /warning %}}
|
||||
|
||||
## Reference your RSS Feed in `<head>`
|
||||
|
||||
In your `header.html` template, you can specify your RSS feed in your `<head></head>` tag using Hugo's [Output Formats][Output Formats] like this:
|
||||
|
Reference in New Issue
Block a user