summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Bjorn Lu <bjornlu.dev@gmail.com> 2023-08-15 21:15:29 +0800
committerGravatar GitHub <noreply@github.com> 2023-08-15 21:15:29 +0800
commit5d1d0aeda620dd268d2cb3591009d701ddb3ade5 (patch)
tree304a3d43c2d60de19dfddbb681987266c01c3d1e
parentfa29e4a36f1b2bf49248336d39b09360b77f7403 (diff)
downloadastro-5d1d0aeda620dd268d2cb3591009d701ddb3ade5.tar.gz
astro-5d1d0aeda620dd268d2cb3591009d701ddb3ade5.tar.zst
astro-5d1d0aeda620dd268d2cb3591009d701ddb3ade5.zip
Document SSG format and trailingSlash consistency (#8068)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
-rw-r--r--packages/astro/src/@types/astro.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index 4267e2306..46296883e 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -699,6 +699,10 @@ export interface AstroUserConfig {
* - `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.
+ *
+ * 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';
/**