From 8f11c211d5771ff174ffc94f5b8e913d31a7b6b7 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sun, 23 Jun 2024 10:31:31 -0400 Subject: cmd/xesite: fix the RSS feed Signed-off-by: Xe Iaso --- cmd/xesite/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/xesite/main.go b/cmd/xesite/main.go index a59e690..2b94054 100644 --- a/cmd/xesite/main.go +++ b/cmd/xesite/main.go @@ -5,6 +5,7 @@ import ( "flag" "log" "log/slog" + "mime" "net" "net/http" "os" @@ -34,6 +35,10 @@ var ( siteURL = flag.String("site-url", "https://xeiaso.net/", "URL to use for the site") ) +func init() { + mime.AddExtensionType(".rss", "application/rss+xml") +} + func main() { flagenv.Parse() flag.Parse() @@ -82,7 +87,8 @@ func main() { } mux := http.NewServeMux() - mux.Handle("/", http.FileServer(http.FS(fs))) + mux.Handle("/", http.FileServerFS(fs)) + //mux.Handle("/", http.FileServer(http.FS(fs))) mux.Handle("/api/defs/", http.StripPrefix("/api/defs/", http.FileServer(http.FS(pb.Proto)))) ms := pb.NewMetaServer(&MetaServer{fs}, twirp.WithServerPathPrefix("/api")) -- cgit v1.2.3