SSG/Prerendering: Allow generating foo.html instead of foo/index.html
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- angular, typescript
- Domain
- build-system
Research direction
Start at Angular CLI's prerendering entry point and inspect the existing tests for nested-route output. Confirm the current index.html layout, then define and verify an option that produces a flat route.html layout while preserving the default behavior.
Written by the indexing model from the issue text.
Description
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.htmlby 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
- Dominant language
- TypeScript
- Stars
- 27k
- Forks
- 11.8k
- Avg merge
- 16h 35m
- Merged PRs (30d)
- 176
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from angular/angular-cli
-
area: @angular/build gemini-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
angular/angular-cli#33055 · 1 comment · 3 reactions ·
-
area: @angular/build gemini-triaged
Difficulty 4/5 3-5 days Newbie friendliness 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 assignee ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 assignee ·
All issues in angular/angular-cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·