From 59c1cb412414b188ba2b3ecb2a56ab4dd20e81a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 21 Jun 2023 17:27:06 +0200 Subject: [PATCH] Move rss logic to theme --- layouts/rss.xml | 44 ------------------------------------- themes/hugo-nederburg-theme | 2 +- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 layouts/rss.xml diff --git a/layouts/rss.xml b/layouts/rss.xml deleted file mode 100644 index 22e5ff1..0000000 --- a/layouts/rss.xml +++ /dev/null @@ -1,44 +0,0 @@ -{{- $pctx := . -}} -{{- 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 -}} -{{- if ge $limit 1 -}} -{{- $pages = $pages | first $limit -}} -{{- end -}} -{{- printf "" | safeHTML }} -{{- printf "" | safeHTML }} - - - {{ 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 }} - Hugo -- gohugo.io - {{ site.LanguageCode }}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{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" -}} - {{ printf "" .Permalink .MediaType | safeHTML }} - {{- end -}} - {{ range $pages }} - - {{ .Title }} - {{ .Permalink }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} - {{ .Content | html }} - - {{ end }} - \ No newline at end of file diff --git a/themes/hugo-nederburg-theme b/themes/hugo-nederburg-theme index c2f903d..29d3f3f 160000 --- a/themes/hugo-nederburg-theme +++ b/themes/hugo-nederburg-theme @@ -1 +1 @@ -Subproject commit c2f903d0b270e90dba32e6ae51690e55cb523f56 +Subproject commit 29d3f3f4a5b432d7d5805b8d0ae52a4081b11329