@@ -100,6 +100,7 @@ func renderForDev(w io.Writer, root string, c *content, cfg *config.Config, r *h
100100 "ReposAsJson" : json ,
101101 "Source" : html_template .HTML (buf .String ()),
102102 "Host" : r .Host ,
103+ "FaviconURL" : cfg .FaviconURL ,
103104 })
104105}
105106
@@ -128,7 +129,7 @@ func (h *prdHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
128129 ct := h .content [p ]
129130 if ct != nil {
130131 // if so, render it
131- if err := renderForPrd (w , ct , h .cfgJson , r ); err != nil {
132+ if err := renderForPrd (w , ct , h .cfg , h . cfgJson , r ); err != nil {
132133 log .Panic (err )
133134 }
134135 return
@@ -142,7 +143,7 @@ func (h *prdHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
142143
143144// Renders a templated asset in prd-mode. This strategy will embed
144145// the sources directly in a script tag on the templated page.
145- func renderForPrd (w io.Writer , c * content , cfgJson string , r * http.Request ) error {
146+ func renderForPrd (w io.Writer , c * content , cfg * config. Config , cfgJson string , r * http.Request ) error {
146147 var buf bytes.Buffer
147148 buf .WriteString ("<script>" )
148149 for _ , src := range c .sources {
@@ -160,6 +161,7 @@ func renderForPrd(w io.Writer, c *content, cfgJson string, r *http.Request) erro
160161 "ReposAsJson" : cfgJson ,
161162 "Source" : html_template .HTML (buf .String ()),
162163 "Host" : r .Host ,
164+ "FaviconURL" : cfg .FaviconURL ,
163165 })
164166}
165167
0 commit comments