github.com/elves/elvish@v0.15.0/website/cmd/genblog/feed_tmpl.go (about) 1 package main 2 3 const feedTemplText = `<?xml version="1.0" encoding="utf-8"?> 4 <feed xmlns="http://www.w3.org/2005/Atom"> 5 <title>{{ .BlogTitle }}</title> 6 <link href="{{ .RootURL }}"/> 7 <link rel="self" href="{{ .RootURL }}/feed.atom"/> 8 <updated>{{ .LastModified }}</updated> 9 <id>{{ .RootURL }}/</id> 10 11 {{ $rootURL := .RootURL }} 12 {{ $author := .Author }} 13 {{ range $info := .Articles}} 14 <entry> 15 <title>{{ $info.Title }}</title> 16 {{ $link := print $rootURL "/" $info.Category "/" $info.Name ".html" }} 17 <link rel="alternate" href="{{ $link }}"/> 18 <id>{{ $link }}</id> 19 <updated>{{ $info.LastModified }}</updated> 20 <author><name>{{ $author }}</name></author> 21 <content type="html">{{ $info.Content | html }}</content> 22 </entry> 23 {{ end }} 24 </feed> 25 `