Skip to content

Commit

Permalink
tiny punctuation/conjunction nit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah11918 authored Jan 30, 2024
1 parent 291f1b0 commit 8ae668c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .changeset/tame-flies-confess.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Adds a new `build.format` configuration option: 'preserve'. This option will preserve your source structure in the final build.

The existing configuration options, `file` and `directory`, either build all of your HTML pages as files matching the route name (e.g. `/about.html`) or build all your files as `index.html` within a nested directory structure (e.g. `/about/index.html), respectively. It was not previously possible to control the HTML file built on a per-file basis.
The existing configuration options, `file` and `directory`, either build all of your HTML pages as files matching the route name (e.g. `/about.html`) or build all your files as `index.html` within a nested directory structure (e.g. `/about/index.html`), respectively. It was not previously possible to control the HTML file built on a per-file basis.

One limitation of `build.format: 'file'` is that it cannot create `index.html` files for any individual routes (other than the base path of `/`) while otherwise building named files. Creating explicit index pages within your file structure still generates a file named for the page route (e.g. `src/pages/about/index.astro` builds `/about.html`) when using the `file` configuration option.

Expand All @@ -15,4 +15,4 @@ The new format will preserve how the filesystem is structured and make sure that
- `about.astro` becomes `about.html`
- `about/index.astro` becomes `about/index.html`

See the [`build.format` configuration options reference] for more details
See the [`build.format` configuration options reference] for more details.
2 changes: 1 addition & 1 deletion packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ export interface AstroUserConfig {
* Control the output file format of each page. This value may be set by an adapter for you.
* - `'file'`: Astro will generate an HTML file named for each page route. (e.g. `src/pages/about.astro` and `src/pages/about/index.astro` both build the file `/about.html`)
* - `'directory'`: Astro will generate a directory with a nested `index.html` file for each page. (e.g. `src/pages/about.astro` and `src/pages/about/index.astro` both build the file `/about/index.html`)
* - `'preserve'`: Astro will generate HTML files exactly as they appear in your source folder. (e.g. `src/pages/about.astro` builds `/about.html` but `src/pages/about/index.astro` builds the file `/about/index.html`)
* - `'preserve'`: Astro will generate HTML files exactly as they appear in your source folder. (e.g. `src/pages/about.astro` builds `/about.html` and `src/pages/about/index.astro` builds the file `/about/index.html`)
*
* ```js
* {
Expand Down

0 comments on commit 8ae668c

Please sign in to comment.