blog

My blog at www.shimmy1996.com

git clone git://git.shimmy1996.com/blog.git

list.comments.xml (1099B)

    1 <feed xmlns="http://www.w3.org/2005/Atom">
    2   <title>{{ i18n "hyperskip-header" }} | {{ .Site.Title }}</title>
    3   <link href="{{ .Permalink }}"/>
    4   <link href="{{ .Permalink }}comments.xml" rel="self"/>
    5   <id>{{ .Permalink }}</id>
    6   {{ $count := 0 }}
    7   {{ range (sort $.Site.Data.comments.comments "time" "desc") }}
    8   {{ if strings.HasPrefix .uri (printf "/%s/" $.Language) }}
    9   {{ $count = add $count 1 }}
   10   {{ if eq $count 1 }}
   11   <updated>{{ .time.Format "2006-01-02T15:04:05-07:00" }}</updated>
   12   {{ end }}
   13   {{ if le $count 20 }}
   14   {{ $timestamp := .time.Format "2006-01-02T15:04:05-07:00" }}
   15   {{ $hash := print .name $timestamp | md5 | last 7 }}
   16   <entry>
   17     <id>{{ .uri | absURL }}#{{ $hash }}</id>
   18     <link href="{{ .uri | absURL }}#{{ $hash }}"/>
   19     <author><name>{{ .name }}</name></author>
   20     <updated>{{ .time.Format "2006-01-02T15:04:05-07:00" }}</updated>
   21     <title>{{ truncate $.Site.Params.summaryLength "…" .content }}</title>
   22     {{ `<content type="html"><![CDATA[` | safeHTML }}{{ .content | markdownify }}]]></content>
   23   </entry>
   24   {{ end }}
   25   {{ end }}
   26   {{ end }}
   27 </feed>