Document SSG format and trailingSlash consistency (#8068)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
This commit is contained in:
parent
fa29e4a36f
commit
5d1d0aeda6
1 changed files with 4 additions and 0 deletions
|
@ -699,6 +699,10 @@ export interface AstroUserConfig {
|
||||||
* - `file` - The `Astro.url.pathname` will include `.html`; ie `/foo.html`.
|
* - `file` - The `Astro.url.pathname` will include `.html`; ie `/foo.html`.
|
||||||
*
|
*
|
||||||
* This means that when you create relative URLs using `new URL('./relative', Astro.url)`, you will get consistent behavior between dev and build.
|
* This means that when you create relative URLs using `new URL('./relative', Astro.url)`, you will get consistent behavior between dev and build.
|
||||||
|
*
|
||||||
|
* To prevent inconsistencies with trailing slash behaviour in dev, you can restrict the [`trailingSlash` option](#trailingslash) to `'always'` or `'never'` depending on your build format:
|
||||||
|
* - `directory` - Set `trailingSlash: 'always'`
|
||||||
|
* - `file` - Set `trailingSlash: 'never'`
|
||||||
*/
|
*/
|
||||||
format?: 'file' | 'directory';
|
format?: 'file' | 'directory';
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue