I can’t find this in docs and curious if there is support for index files other than index.html ?
That is /directory/index.html is automatically available as /directory/
Would /feed/index.xml be available as /feed/ with correct XML headers and such? Any other kind of index file?
This is initially prompted by Hugo having feeds at index.xml and needing to serve them at /feed/ endpoints.
I know that can be done with redirect/rewrite (which I currently do), but this got me interested are there any other index files supported, or is it only index.html.
I chatted with our docs team about this today and our common consensus is that if you build an xml file with your app, we will serve that xml file, it is completely up to you to set your project up the way you want to. It’s the browser that loads whichever index file you create.
Do keep in mind though that if you have both an index.html and an index.xml, I do believe the index.html overrides any other file type/extension.
I chatted with our docs team about this today and our common consensus is that if you build an xml file with your app, we will serve that xml file
To be clear you would serve as directory index and with XML headers?
What about any other type of file?
It’s the browser that loads whichever index file you create.
It is a web server that chooses which file is served as directory index (which is commonly a selection of multiple possible files). The index.html part is not visible or decided by the browser when a directory is served to it by a web server.
To be clear we ONLY automatically serve index.html
The rest is “servable by you, by explicit URL, only”.
We do not now, and do not intend to, support anything else. If you want to “automagically” load a file at a path that isn’t called index.html, you can certainly use a redirect (cf Redirects and rewrites | Netlify Docs) to make it happen: