This repository has been archived on 2025-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
trantor/templates/search.rss

34 lines
771 B
XML
Raw Normal View History

2013-08-31 00:38:32 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
{{with .S}}
<title>{{.Title}}</title>
2013-08-31 00:38:32 +02:00
{{if .Search}}
<description>Book search: {{.Search}}</description>
{{else}}
<description>Last books added</description>
{{end}}
<link>{{.BaseURL}}</link>
{{end}}
{{$baseURL := .S.BaseURL}}
{{range .Books}}
<item>
<title>{{.Title}} - {{index .Authors 0}}</title>
2013-08-31 00:38:32 +02:00
<description>{{.Description}}</description>
2016-07-30 07:59:30 -04:00
<link>{{$baseURL}}/book/{{.ID}}</link>
2013-08-31 00:38:32 +02:00
{{if .Isbn}}
<guid isPermaLink="false">ISBN: {{.Isbn}}</guid>
{{end}}
2016-07-30 07:59:30 -04:00
<enclosure url="{{$baseURL}}/download/{{.ID}}/{{.Title}}.epub" length="{{.FileSize}}" type="application/epub+zip" />
{{range .Authors}}
2013-08-31 00:38:32 +02:00
{{if .}}
<category>{{.}}</category>
{{end}}
{{end}}
</item>
{{end}}
</channel>
</rss>