hmn/src/templates/src/atom.xml

49 lines
1.6 KiB
XML

{{ noescape "<?xml version=\"1.0\" encoding=\"utf-8\"?>" }}
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text">{{ .Title }}</title>
<subtitle type="html">{{ .Subtitle }}</subtitle>
<link href="{{ .HomepageUrl }}"/>
<link rel="self" type="application/atom+xml" href="{{ .AtomFeedUrl }}"/>
<link rel="alternate" type="text/html" hreflang="en" href="{{ .FeedUrl }}"/>
<rights type="html">{{ .CopyrightStatement }}</rights>
<generator uri="{{ .HomepageUrl }}" version="{{ .SiteVersion }}">Handmade Network site engine v{{ .SiteVersion }}</generator>
<updated>{{ rfc3339 .Updated }}</updated>
<id>{{ .FeedID }}</id>
{{ if .Posts }}
{{ range .Posts }}
<entry>
<title>{{ if .PostTypePrefix }}{{ .PostTypePrefix }}: {{ end }}{{ .Title }}</title>
<link rel="alternate" type="text/html" href="{{ .Url }}" />
<id>{{ .UUID }}</id>
<published>{{ rfc3339 .Date }}</published>
<updated>{{ rfc3339 .LastEditDate }}</updated>
<author>
<name>{{ .User.Name }}</name>
<uri>{{ .User.ProfileUrl }}</uri>
</author>
<summary type="html">{{ .Preview }}</summary>
</entry>
{{ end }}
{{ else if .Projects }}
{{ range .Projects }}
<entry>
<title>{{ .Name }}</title>
<link rel="alternate" type="text/html" href="{{ .Url }}" />
<id>{{ .UUID }}</id>
<published>{{ rfc3339 .DateApproved }}</published>
{{ range .Owners }}
<author>
<name>{{ .Name }}</name>
<uri>{{ .ProfileUrl }}</uri>
</author>
{{ end }}
<logo>{{ .LogoLight }}</logo>
<summary type="html">{{ .Blurb }}</summary>
</entry>
{{ end }}
{{ else if .Snippets }}
{{ range .Snippets }}
{{ end }}
{{ end }}
</feed>