Full text on Rss feed

Hello,

I am trying to display the full text of a rss feed.

As I wrote at a similar post:

I tried to with the following variants:
{{ .Content | safeHTML }}

{{ .Summary | safeHTML }}

and

{{- .Content | html -}}

but the content in the feed is not full yet.

Does anybody know if there is anything else that I should modify?
I am using the minimo theme: https://themes.gohugo.io/themes/minimo/ with R blogdown.

This is the code that I am now using:

<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>
    <link>{{ .Permalink }}</link>
    <description>Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
    <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
    <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
    <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
    <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
    <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
    {{ with .OutputFormats.Get "RSS" }}
        {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
    {{ end }}
    {{ range .Pages }}
    <item>
      <title>{{ .Title }}</title>
      <link>{{ .Permalink }}</link>
      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
      {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
      <guid>{{ .Permalink }}</guid>
      <description>{{- .Content | html -}}</description>
    </item>
    {{ end }}
  </channel>
</rss> 

This looks very similar to the rss template I use for all my Hugo sites, https://github.com/frjo/hugo-theme-zen/blob/master/layouts/_default/rss.xml.

<description>{{ .Content | html }}</description>

Is the same in both so it should work.

Are you sure you have placed it correctly so Hugo is really using it?

If you want it to be used by default you need to place it in “layouts/_default/”.

I placed it in layouts/categories/R/ because I need to have it work only for posts related to the category about R.

Or is there another making to making it work only for a specific category?

Not sure but I do not believe that taxonomi terms can have their own layout. Test to move the template up one level and see what happens.

layouts/categories/rss.xml

If you need special treatment for some terms in the template you could do it with if/then/else.