diff --git a/main.go b/main.go index c6d08a3..354f133 100644 --- a/main.go +++ b/main.go @@ -126,7 +126,6 @@ func init() { log.Println("[ init ] Starting...") templates = template.Must(template.ParseFS(TemplatesFS , "templates/*.html")) log.Println("[ init ] Templates Loaded") - log.Println(AssetsFS.ReadDir("assets")) } @@ -149,6 +148,20 @@ func main() { }, ) + handler.HandleFunc( + "/sitemap.txt", + func(w http.ResponseWriter, r *http.Request) { + sitemapFile, err := AssetsFS.ReadFile("assets/sitemap.txt") + if err != nil { + log.Println(err.Error()) + w.WriteHeader(500) + return + } + w.Write(sitemapFile) + }, + ) + + handler.HandleFunc( "/download", func(w http.ResponseWriter, r *http.Request) {