diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-06-23 10:31:31 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-06-23 10:31:31 -0400 |
| commit | 8f11c211d5771ff174ffc94f5b8e913d31a7b6b7 (patch) | |
| tree | f8aba215271333cc5de999017659996aee50d3fd /cmd/xesite | |
| parent | e4be7989dedd95e5a79735ca70bbdbb2c8015428 (diff) | |
| download | xesite-8f11c211d5771ff174ffc94f5b8e913d31a7b6b7.tar.xz xesite-8f11c211d5771ff174ffc94f5b8e913d31a7b6b7.zip | |
cmd/xesite: fix the RSS feed
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/xesite')
| -rw-r--r-- | cmd/xesite/main.go | 8 |
1 files changed, 7 insertions, 1 deletions
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")) |
