~erock/pico

17c72570e0f124a152b1043850fcd368a801f9ab — Eric Bower a month ago 648d682
fix(lists): need template funcs for rss feeds
1 files changed, 4 insertions(+), 2 deletions(-)

M lists/api.go
M lists/api.go => lists/api.go +4 -2
@@ 480,7 480,7 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
		return
	}

	ts, err := template.New("base").Funcs(shared.FuncMap).ParseFiles(
	ts, err := template.New("rss.page.tmpl").Funcs(shared.FuncMap).ParseFiles(
		cfg.StaticPath("html/rss.page.tmpl"),
		cfg.StaticPath("html/list.partial.tmpl"),
	)


@@ 530,6 530,7 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
			Items:    parsed.Items,
		}
		if err := ts.Execute(&tpl, data); err != nil {
			logger.Error(err)
			continue
		}



@@ 574,7 575,7 @@ func rssHandler(w http.ResponseWriter, r *http.Request) {
		return
	}

	ts, err := template.New("base").Funcs(shared.FuncMap).ParseFiles(
	ts, err := template.New("rss.page.tmpl").Funcs(shared.FuncMap).ParseFiles(
		cfg.StaticPath("html/rss.page.tmpl"),
		cfg.StaticPath("html/list.partial.tmpl"),
	)


@@ 601,6 602,7 @@ func rssHandler(w http.ResponseWriter, r *http.Request) {
			Items:    parsed.Items,
		}
		if err := ts.Execute(&tpl, data); err != nil {
			logger.Error(err)
			continue
		}