GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — SSG/Prerendering: Allow generating foo.html instead of foo/index.html · Issue #29173 · angular/angular-cli

SSG/Prerendering: Allow generating foo.html instead of foo/index.html #29173

New issue
Copy link
New issue
Copy link
Closed
Enhancement
#34180
Closed
SSG/Prerendering: Allow generating foo.html instead of foo/index.html#29173
Enhancement
#34180
Copy link
Labels
angular/build:applicationarea: @angular/buildarea: @angular/ssrfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues

Description

@fmalcher
fmalcher
opened on Dec 18, 2024
Issue body actions

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

  • Jekyll always outputs myslug.html
  • Nuxt v2 has an option
  • Next.js has an option

Most cloud hosting providers allow to serve myslug.html under myslug:

  • GitHub Pages
  • Cloudflare Pages
  • Firebase Hosting
  • Vercel
  • Netlify

Further read on trailing slash and framework/provider support: https://bjornlu.com/blog/trailing-slash-for-frameworks

Reacted by Sander Elias, Danny Koppenhagen, Alan Agius, Nicolás Cámera, Ferdinand Malcher, Santosh Yadav, Wouter Bastaens, Brandon Roberts, Philipp Bauer, Sercan Yemen and 7 more

Activity

  1. alan-agius4
    added
    featureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues
    angular/build:application
    area: @angular/ssr
    area: @angular/build
    on Dec 18, 2024
  2. SanderElias commented on Dec 18, 2024

    @SanderElias
    SanderElias
    on Dec 18, 2024
    More actions

    I like the idea.
    Just ensure that it is appropriately documented that only some providers support this.
    Preferably, this should be done even in a way that surfaces this in the code-editor when they use this option.

  3. angular-robot
    added
    feature: votes requiredFeature request which is currently still in the voting phaseFeature request which is currently still in the voting phase
    on Dec 18, 2024
  4. angular-robot commented on Dec 18, 2024

    @angular-robot
    angular-robotBot
    on Dec 18, 2024 – with Angular Robot
    Contributor
    More actions

    This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

    You can find more details about the feature request process in our documentation.

  5. angular-robot commented on Jan 27, 2025

    @angular-robot
    angular-robotBot
    on Jan 27, 2025 – with Angular Robot
    Contributor
    More actions

    Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

    Find more details about Angular's feature request process in our documentation.

  6. angular-robot
    removed
    feature: votes requiredFeature request which is currently still in the voting phaseFeature request which is currently still in the voting phase
    on Feb 16, 2025
  7. angular-robot commented on Feb 16, 2025

    @angular-robot
    angular-robotBot
    on Feb 16, 2025 – with Angular Robot
    Contributor
    More actions

    Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

    We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

    You can find more details about the feature request process in our documentation.

  8. angular-robot
    added
    feature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authorsLabel to add when the not a sufficient number of votes or comments from unique authors
    on Feb 16, 2025
  9. alan-agius4
    removed
    feature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authorsLabel to add when the not a sufficient number of votes or comments from unique authors
    on Jun 23, 2025
  10. angular-robot
    added
    feature: votes requiredFeature request which is currently still in the voting phaseFeature request which is currently still in the voting phase
    on Jun 23, 2025
  11. angular-robot commented on Jun 23, 2025

    @angular-robot
    angular-robotBot
    on Jun 23, 2025 – with Angular Robot
    Contributor
    More actions

    Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

    We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

    You can find more details about the feature request process in our documentation.

  12. angular-robot
    added
    feature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authorsLabel to add when the not a sufficient number of votes or comments from unique authors
    and removed
    feature: votes requiredFeature request which is currently still in the voting phaseFeature request which is currently still in the voting phase
    on Jun 23, 2025
  13. alan-agius4
    removed
    feature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authorsLabel to add when the not a sufficient number of votes or comments from unique authors
    on Sep 24, 2026
  14. JohannesHoppe commented on Sep 25, 2026

    @JohannesHoppe
    JohannesHoppe
    on Sep 25, 2026
    Contributor
    More actions

    I've opened a PR with a proposal for this: #34180. It adds a format property to the prerender option ("directory" by default, "file" for <route>.html), following Astro's build.format.

    For anyone who can't wait: @angular-schule/prerender-format is a drop-in builder for Angular 22 that provides the same option until it lands in Angular (ng add @angular-schule/prerender-format).

    Reacted by Ferdinand Malcher
  15. JohannesHoppe
    added 4 commits that reference this issue on Sep 25, 2026

    feat(@angular/build): add `prerenderFormat` option to prerender route…

    This issue will close once commit e5d9701 is merged into the 'master' branch.
    e5d9701

    feat(@angular/build): add `prerenderFormat` option to prerender route…

    This issue will close once commit 0da3613 is merged into the 'master' branch.
    0da3613

    feat(@angular/build): add `prerenderFormat` option to prerender route…

    This issue will close once commit e2d2305 is merged into the 'master' branch.
    e2d2305

    feat(@angular/build): add `prerenderFormat` option to prerender route…

    This issue will close once commit a6dd90a is merged into the 'master' branch.
    a6dd90a
  16. JohannesHoppe
    added a commit that references this issue on Oct 8, 2026

    feat(@angular/build): add `prerender.format` option to prerender rout…

    This issue will close once commit 4f2ca8e is merged into the 'master' branch.
    4f2ca8e
  17. alan-agius4
    closed this as completedin #34180on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    angular/build:applicationarea: @angular/buildarea: @angular/ssrfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issues

    Type

    Enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.