1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00
seirdy.one/layouts/_default/list.atom.xml
2022-05-28 13:43:30 -07:00

39 lines
1.4 KiB
XML

{{- $pages := (where site.RegularPages "Section" .Section) -}}
{{- if .IsHome }}
{{- $pages = where .Site.RegularPages "Section" "" -}}
{{ end -}}
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ .Site.LanguageCode }}">
<title>{{ .Site.Title }}</title>
<link rel="self" type="application/atom+xml" href="{{ .Permalink }}atom.xml" />
<icon>{{ .Site.Params.icon | absURL }}</icon>
<subtitle>{{ .Site.Params.Description }}</subtitle>
<author>
<name>Rohan Kumar</name>
<uri>https://seirdy.one/</uri>
</author>
<updated>{{ now.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<id>{{ .Permalink }}</id>
{{ range $pages }}
<entry>
<title type="html"><![CDATA[{{ .Title | safeHTML }}]]></title>
<link href="{{ .Permalink }}" />
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<author>
<name>Rohan Kumar</name>
<uri>https://seirdy.one/</uri>
</author>
<id>{{ .Permalink }}</id>
<rights>CC-BY-SA 4.0 by Rohan Kumar</rights>
<content type="html"><![CDATA[{{ .Content | safeHTML }}]]></content>
<object-type xmlns="http://activitystrea.ms/spec/1.0/">
{{- if eq .Section "notes" -}}
note
{{- else if eq .Section "posts" -}}
article
{{- end -}}
</object-type>
</entry>
{{ end }}
</feed>