1
0

Added sitemap.xml.

This commit is contained in:
Alexander Andreev 2023-05-21 22:44:09 +04:00
parent 2987cf4a2a
commit 47bc1a8e02
Signed by: Arav
GPG Key ID: D22A817D95815393
3 changed files with 21 additions and 0 deletions

View File

@ -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 {

View File

@ -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)
}

15
web/assets/sitemap.xml Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://radio.arav.su/</loc>
<lastmod>2023-03-13</lastmod>
</url>
<url>
<loc>https://radio.arav.su/filelist</loc>
<lastmod>2023-05-21</lastmod>
</url>
<url>
<loc>https://radio.arav.su/playlist</loc>
<lastmod>2023-02-23</lastmod>
</url>
</urlset>