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

オープン
#29,173 コメント 5 件 リアクション 16 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
angular, typescript
領域
build-system

調査の方向性

Angular CLI の prerendering エントリポイントから開始し、ネストされたルートの出力に関する既存のテストを確認します。現在の index.html のレイアウトを確認したうえで、デフォルトの動作を維持しながらフラットな route.html のレイアウトを生成するオプションを定義し、検証します。

索引モデルが issue の本文から書いたものです。

説明

angular/build:application area: @angular/build area: @angular/ssr feature feature: insufficient votes
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

主要言語
TypeScript
スター
27k
フォーク
11.8k
平均マージ
16時間 35分
マージ済み PR(30日)
176

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

angular/angular-cli のほかの issue

angular/angular-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。