From f51ad4981904a9cb0ad9729b6d204532fef4371d Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 4 Nov 2023 15:36:08 +0530 Subject: [PATCH] replace .Site with site & fix whitespace --- layouts/_default/rss.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 3b28fbf..b6a7ec0 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -31,23 +31,23 @@ {{- end }} {{- $pctx := . }} -{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- if .IsHome }}{{ $pctx = site }}{{ end }} {{- $pages := slice }} {{- if or $.IsHome $.IsSection }} {{- $pages = $pctx.RegularPages }} {{- else }} {{- $pages = $pctx.Pages }} {{- end }} -{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- $limit := site.Config.Services.RSS.Limit }} {{- if ge $limit 1 }} {{- $pages = $pages | first $limit }} {{- end }} {{- printf "" | safeHTML }} - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} + {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }} {{ .Permalink }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }} + Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }} {{- with site.Params.images }} {{ site.Title }} @@ -58,7 +58,7 @@ Hugo -- gohugo.io {{ site.Language.LanguageCode }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} - {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with site.Copyright }} {{ . }}{{ end }}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" }} @@ -78,6 +78,6 @@ {{- end }} {{- end }} - {{ end }} + {{- end }}