Add basic html/rss support for book lists
This commit is contained in:
parent
c0a70a18e1
commit
46762ea17b
11 changed files with 254 additions and 78 deletions
|
@ -11,23 +11,7 @@
|
|||
<link>{{.BaseURL}}</link>
|
||||
{{end}}
|
||||
|
||||
{{$baseURL := .S.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}}
|
||||
{{template "book_list.rss" book_list .Books .S.BaseURL}}
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
|
|
Reference in a new issue