- commit
- 17c7257
- parent
- 648d682
- author
- Eric Bower
- date
- 2022-08-08 16:26:51 +0000 UTC
fix(lists): need template funcs for rss feeds
1 files changed,
+4,
-2
+4,
-2
1@@ -480,7 +480,7 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
2 return
3 }
4
5- ts, err := template.New("base").Funcs(shared.FuncMap).ParseFiles(
6+ ts, err := template.New("rss.page.tmpl").Funcs(shared.FuncMap).ParseFiles(
7 cfg.StaticPath("html/rss.page.tmpl"),
8 cfg.StaticPath("html/list.partial.tmpl"),
9 )
10@@ -530,6 +530,7 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
11 Items: parsed.Items,
12 }
13 if err := ts.Execute(&tpl, data); err != nil {
14+ logger.Error(err)
15 continue
16 }
17
18@@ -574,7 +575,7 @@ func rssHandler(w http.ResponseWriter, r *http.Request) {
19 return
20 }
21
22- ts, err := template.New("base").Funcs(shared.FuncMap).ParseFiles(
23+ ts, err := template.New("rss.page.tmpl").Funcs(shared.FuncMap).ParseFiles(
24 cfg.StaticPath("html/rss.page.tmpl"),
25 cfg.StaticPath("html/list.partial.tmpl"),
26 )
27@@ -601,6 +602,7 @@ func rssHandler(w http.ResponseWriter, r *http.Request) {
28 Items: parsed.Items,
29 }
30 if err := ts.Execute(&tpl, data); err != nil {
31+ logger.Error(err)
32 continue
33 }
34