diff --git a/cmd/dwelling-home/main.go b/cmd/dwelling-home/main.go index 3ac94e4..66957ca 100644 --- a/cmd/dwelling-home/main.go +++ b/cmd/dwelling-home/main.go @@ -79,6 +79,7 @@ func main() { } r.ServeStatic("/assets/*filepath", web.Assets()) + r.Handler(http.MethodGet, "/favicon.ico", dwhttp.FaviconIco) r.Handler(http.MethodGet, "/robots.txt", dwhttp.RobotsTxt) r.Handler(http.MethodGet, "/rss.xml", hand.RSS) r.Handler(http.MethodGet, "/sitemap.xml", dwhttp.SitemapXml) diff --git a/internal/http/web_handlers.go b/internal/http/web_handlers.go index c736444..6d39aed 100644 --- a/internal/http/web_handlers.go +++ b/internal/http/web_handlers.go @@ -162,6 +162,11 @@ func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) { web.RSS(r.URL.Scheme+"://"+r.Host, "Arav", posts, r, w) } +func FaviconIco(w http.ResponseWriter, r *http.Request) { + data, _ := web.AssetsGetFile("img/favicon.ico") + w.Write(data) +} + func RobotsTxt(w http.ResponseWriter, r *http.Request) { data, _ := web.AssetsGetFile("robots.txt") w.Write(data) diff --git a/web/assets/img/favicon.ico b/web/assets/img/favicon.ico old mode 100755 new mode 100644 index 2fef958..1fc72b9 Binary files a/web/assets/img/favicon.ico and b/web/assets/img/favicon.ico differ