From 47bc1a8e02811323062bcfd6a95ed8ea24f2f525 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 21 May 2023 22:44:09 +0400 Subject: [PATCH] Added sitemap.xml. --- cmd/dwelling-radio/main.go | 1 + internal/http/handlers.go | 5 +++++ web/assets/sitemap.xml | 15 +++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 web/assets/sitemap.xml diff --git a/cmd/dwelling-radio/main.go b/cmd/dwelling-radio/main.go index 4055618..d76cd52 100644 --- a/cmd/dwelling-radio/main.go +++ b/cmd/dwelling-radio/main.go @@ -65,6 +65,7 @@ func main() { srv.GET("/filelist", hand.Filelist) srv.GET("/robots.txt", http.RobotsTxt) + srv.GET("/sitemap.xml", http.SitemapXML) srv.GET("/favicon.svg", http.Favicon) if !*noLiquidsoap { diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 9bec6d9..f57cdb7 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -114,3 +114,8 @@ func Favicon(w http.ResponseWriter, r *http.Request) { data, _ := web.AssetsGetFile("img/favicon.svg") w.Write(data) } + +func SitemapXML(w http.ResponseWriter, r *http.Request) { + data, _ := web.AssetsGetFile("sitemap.xml") + w.Write(data) +} diff --git a/web/assets/sitemap.xml b/web/assets/sitemap.xml new file mode 100644 index 0000000..80ca10f --- /dev/null +++ b/web/assets/sitemap.xml @@ -0,0 +1,15 @@ + + + + https://radio.arav.su/ + 2023-03-13 + + + https://radio.arav.su/filelist + 2023-05-21 + + + https://radio.arav.su/playlist + 2023-02-23 + + \ No newline at end of file