{{$baseURL := .BaseURL}}
{{range .Books}}
 <item>
  <title>{{.Title}} - {{index .Authors 0}}</title>
  <description>{{.Description}}</description>
  <link>{{$baseURL}}/book/{{.ID}}</link>
{{if .Isbn}}
  <guid isPermaLink="false">ISBN: {{.Isbn}}</guid>
{{end}}
  <enclosure url="{{$baseURL}}/download/{{.ID}}/{{.Title}}.epub" length="{{.FileSize}}" type="application/epub+zip" />
{{range .Authors}}
  {{if .}}
  <category>{{.}}</category>
  {{end}}
{{end}}
 </item>
{{end}}