statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.64k stars 236 forks source link

Preview server does not detect other index files (index.xml) #893

Open clairernovotny opened 4 years ago

clairernovotny commented 4 years ago

The preview web server isn't detecting & serving an xml index file called index.xml. I'd expect that to be served implicitly.

daveaglick commented 4 years ago

Yeah, that should probably be served by default. Root cause is that Kestrel won't serve any content types it doesn't know about. Try adding --content-type xml=text/xml on the CLI and see if it works for now.

I'll add XML as a default for the next release. I've also got a long content type mapping dictionary now that I didn't have when I wrote that part - since it's a local server, maybe I'll just enable every content type by default.

clairernovotny commented 4 years ago

The specific use case here is an RSS feed where the path is /api/rss