kiln/templates/_default/atom.xml
oliverpool 2ef8f77d24 tasks: add tasks.feeds support
Every task can now have a [[tasks.feeds]] entry to generate one or more feeds.
It must have the following arguments:

[[tasks.feeds]]
input_dir = ""
title = "Example feed"
template = "atom.xml"
output = "atom.xml"
2021-09-02 19:25:32 -04:00

18 lines
663 B
XML

{{ `<?xml version="1.0" encoding="utf-8"?>` | safeHTML }}
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ index site.URLs 0 }}{{ .Permalink }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Updated.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<link href="{{ index site.URLs 0 | safeURL }}{{ .Permalink }}" rel="alternate"/>
{{ range .Pages }}<entry>
<id>{{ index site.URLs 0 }}{{ .Permalink }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</updated>
{{- $permalink := .Permalink }}
{{- range site.URLs }}
<link href="{{ . | safeURL }}{{ $permalink }}" rel="alternate"/>
{{- end }}
</entry>
{{ end -}}
</feed>