From 0a328b0ca298fd297bcca6cd1d341d214d3c8585 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 11 May 2018 09:34:34 +0100 Subject: [PATCH] Override builtin RSS template to cleanup and add encoded content --- layouts/_default/rss.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 layouts/_default/rss.xml diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..dc7d2fe --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,27 @@ + + + + {{ .Title }} + {{ .Permalink }} + Recent content in {{ .Title }} + Hugo -- gohugo.io + {{ .Site.LanguageCode }} + {{ partial "copyright.html" . | html }} + {{ .Site.Params.author }} + {{ .Site.Params.author }} + {{ now.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range .Data.Pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ .Permalink }} + {{ .Date.Format .Site.Params.iso8601 }} + {{ printf "" (replace .Content "\n" "") | safeHTML }} + + {{ end }} + +