Refactor templates to make take care of fmt
This commit is contained in:
parent
e81df155a2
commit
c132c0fdf6
11 changed files with 51 additions and 59 deletions
20
templates/news.rss
Normal file
20
templates/news.rss
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
{{with .S}}
|
||||
<title>Imperial Library of Trantor - News</title>
|
||||
<description>News of the library</description>
|
||||
<link>{{.BaseURL}}/news/</link>
|
||||
{{end}}
|
||||
|
||||
{{$baseURL := .S.BaseURL}}
|
||||
{{range .News}}
|
||||
<item>
|
||||
<title>{{.Date}}</title>
|
||||
<description>{{.Text}}</description>
|
||||
<link>{{$baseURL}}/news/</link>
|
||||
</item>
|
||||
{{end}}
|
||||
|
||||
</channel>
|
||||
</rss>
|
Reference in a new issue