Added /favicon.ico.
This commit is contained in:
parent
21cf1e3f51
commit
af1af0764e
@ -79,6 +79,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
r.ServeStatic("/assets/*filepath", web.Assets())
|
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, "/robots.txt", dwhttp.RobotsTxt)
|
||||||
r.Handler(http.MethodGet, "/rss.xml", hand.RSS)
|
r.Handler(http.MethodGet, "/rss.xml", hand.RSS)
|
||||||
r.Handler(http.MethodGet, "/sitemap.xml", dwhttp.SitemapXml)
|
r.Handler(http.MethodGet, "/sitemap.xml", dwhttp.SitemapXml)
|
||||||
|
@ -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)
|
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) {
|
func RobotsTxt(w http.ResponseWriter, r *http.Request) {
|
||||||
data, _ := web.AssetsGetFile("robots.txt")
|
data, _ := web.AssetsGetFile("robots.txt")
|
||||||
w.Write(data)
|
w.Write(data)
|
||||||
|
BIN
web/assets/img/favicon.ico
Executable file → Normal file
BIN
web/assets/img/favicon.ico
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 7.5 KiB |
Loading…
Reference in New Issue
Block a user