From 52f71fd820858206d823c2d967dd0abbd9e2e8d2 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Sun, 29 Mar 2020 17:44:07 +0200 Subject: adding atom feed --- layouts/index.atom.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 layouts/index.atom.xml (limited to 'layouts/index.atom.xml') diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml new file mode 100644 index 0000000..7443f34 --- /dev/null +++ b/layouts/index.atom.xml @@ -0,0 +1,36 @@ +{{- $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 -}} + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + + {{ if not .Date.IsZero }} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}{{end}} + {{ .Permalink }}{{ with .Site.Author.name }} + + {{.}}{{ with $.Site.Author.email }} + {{.}}{{end}} + {{end}} + Hugo -- gohugo.io + {{ range where $pages "Params.hidden" "ne" "true" }} + + {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> + + {{ .Permalink }}{{ with .Site.Params.Author }} + + {{.}} + {{end}} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }} + {{ ` + {{ end }} + -- cgit v1.2.3