SSG/Prerendering: Allow generating foo.html instead of foo/index.html #29173
Labels
angular/build:application
area: @angular/build
area: @angular/ssr
feature: votes required
Feature request which is currently still in the voting phase
feature
Issue that requests a new feature
Description
Angular's Prerendering puts nested routes into a subfolder with
index.html
:=> Route
blog/myslug
becomesblog/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
becomesblog/myslug.html
Proposed solution:
myslug/index.html
by 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.html
Most cloud hosting providers allow to serve
myslug.html
undermyslug
:Further read on trailing slash and framework/provider support: https://bjornlu.com/blog/trailing-slash-for-frameworks
The text was updated successfully, but these errors were encountered: