Description
Angular's Prerendering puts nested routes into a subfolder with index.html:
=> Route blog/myslug becomes blog/myslug/index.html
The web server adds a trailing slash (for the folder) which is then removed by the Angular router, and it leads to an initial redirect.
Describe the solution you'd like
Some static site generators allow to create a flat structure instead with no subfolder:
=> Route blog/myslug becomes blog/myslug.html
Proposed solution:
- Output
myslug/index.html by default, it is the most compatible output that works on each and every web server
- add an option for flat output (
myslug.html) that can be used if I know my web server supports this
Context
Most cloud hosting providers allow to serve myslug.html under myslug:
Further read on trailing slash and framework/provider support: https://bjornlu.com/blog/trailing-slash-for-frameworks
Description
Angular's Prerendering puts nested routes into a subfolder with
index.html:=> Route
blog/myslugbecomesblog/myslug/index.htmlThe web server adds a trailing slash (for the folder) which is then removed by the Angular router, and it leads to an initial redirect.
Describe the solution you'd like
Some static site generators allow to create a flat structure instead with no subfolder:
=> Route
blog/myslugbecomesblog/myslug.htmlProposed solution:
myslug/index.htmlby default, it is the most compatible output that works on each and every web servermyslug.html) that can be used if I know my web server supports thisContext
myslug.htmlMost cloud hosting providers allow to serve
myslug.htmlundermyslug:Further read on trailing slash and framework/provider support: https://bjornlu.com/blog/trailing-slash-for-frameworks