Refactor templates to make take care of fmt

This commit is contained in:
Las Zenow 2014-08-30 01:25:16 -05:00
parent e81df155a2
commit c132c0fdf6
11 changed files with 51 additions and 59 deletions

20
templates/news.rss Normal file
View 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>