Skip to content
Permalink
Browse files

Fix RSS

New template, adapted.
  • Loading branch information...
PhilRW committed Nov 13, 2019
1 parent 862b806 commit 35f6be96fdcf7325b43c80cf0b9dac1ca06eeafb
Showing with 4 additions and 2 deletions.
  1. +4 −2 layouts/rss.xml
@@ -1,9 +1,11 @@
{{- $pages := .Data.Pages -}}
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
{{- 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>

0 comments on commit 35f6be9

Please sign in to comment.
You can’t perform that action at this time.