Skip to content

Commit

Permalink
Fix RSS
Browse files Browse the repository at this point in the history
New template, adapted.
  • Loading branch information
PhilRW committed Nov 19, 2019
1 parent 862b806 commit 35f6be9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layouts/rss.xml
Original file line number Diff line number Diff line change
@@ -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>
Expand Down

0 comments on commit 35f6be9

Please sign in to comment.