1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 18:50:29 -04:00
jarv.is/layouts/index.atom

41 lines
1.4 KiB
XML

{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ .Site.Title }}</title>
<id>{{ .Permalink }}</id>
<author>
<name>{{ .Site.Title }}</name>
<uri>{{ .Permalink }}</uri>
</author>
<generator>Hugo -- gohugo.io</generator>
{{- with .Site.Copyright }}
<rights>{{ . }}</rights>
{{- end }}
{{- with .Site.Params.defaultImage }}
<logo>{{ . | absURL }}</logo>
{{- end }}
<updated>{{ .Date.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
{{- with .OutputFormats.Get "ATOM" }}
{{ printf `<link rel="self" type="%s" href="%s" />` .MediaType.Type .Permalink | safeHTML }}
{{- end }}
{{- range .AlternativeOutputFormats }}
{{ printf `<link rel="alternate" type="%s" href="%s" />` .MediaType.Type .Permalink | safeHTML }}
{{- end }}
{{- range (where .Site.RegularPages "Section" .Site.Params.mainSection) }}
<entry>
<title>{{ .Title }}</title>
{{- with .Site.Author.name }}
<author>
<name>{{ . }}</name>
<uri>{{ $.Permalink }}</uri>
</author>
{{- end }}
<id>{{ .Permalink }}</id>
<published>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</published>
<updated>{{ .Date.UTC.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
<content type="html">
{{ .Content | html }}
</content>
</entry>
{{- end }}
</feed>