feat(rss): полный текст и обложки в RSS-ленте, лимит 5 постов

- hugo.toml: ShowFullTextinRSS=true, [services.RSS] limit=5
- тема rDedInit rss.xml: prepend cover (figure.entry-cover, absURL) в content:encoded
- openspec change rss-full-feed (план A реализован)
This commit is contained in:
2026-09-08 20:04:44 +00:00
parent 827d40609e
commit cb4decb672
10 changed files with 261 additions and 1 deletions
+8 -1
View File
@@ -74,7 +74,14 @@
<guid>{{ .Permalink }}</guid>
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
{{- if and site.Params.ShowFullTextinRSS .Content }}
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
{{- $page := . }}
{{- $coverHtml := "" }}
{{- with .Params.cover.image }}
{{- $coverAbs := (path.Join $page.RelPermalink .) | absURL }}
{{- $coverAlt := ($page.Params.cover.alt | default $page.Title) | htmlEscape }}
{{- $coverHtml = printf "<figure class=\"entry-cover\"><img src=\"%s\" alt=\"%s\"></figure>" $coverAbs $coverAlt }}
{{- end }}
<content:encoded>{{ (printf "<![CDATA[%s%s]]>" $coverHtml .Content) | safeHTML }}</content:encoded>
{{- end }}
</item>
{{- end }}