summaryrefslogtreecommitdiff
path: root/src/gmi/tpl/feed.xml
blob: 2935327fb4e055741f35c63828b5e8e77a3d4989 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{{ $getPostsRes := .GetPosts 0 20 -}}
{{ $posts := $getPostsRes.Posts -}}

<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title>mediocregopher's lil web corner</title>
  <id>{{ .RootURL.Absolute }}</id>
  {{ if gt (len $posts) 0 -}}
  <updated>{{ (index $posts 0).PublishedAt.Format "2006-01-02T15:04:05Z07:00" }}</updated>
  {{ end -}}
  <link href="{{ .RootURL.Absolute }}"></link>
  <author>
    <name>mediocregopher</name>
  </author>
  {{ range $posts -}}
  <entry>
    <title>{{ .Title }}</title>
    <updated>{{ .PublishedAt.Format "2006-01-02T15:04:05Z07:00" }}</updated>
    <id>{{ $.RootURL.Absolute.Post .ID }}</id>
    <link href="{{ $.RootURL.Absolute.Post .ID }}" rel="alternate"></link>
    {{ if .Description -}}
    <summary type="html">{{ .Description }}</summary>
    {{ end -}}
    <author>
      <name>mediocregopher</name>
    </author>
  </entry>
  {{ end -}}
</feed>