Update astro.ts to clarify configuration settings for base (#7392)
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
This commit is contained in:
parent
f6feff7a29
commit
b51d515d2d
1 changed files with 3 additions and 1 deletions
|
@ -547,9 +547,11 @@ export interface AstroUserConfig {
|
||||||
*
|
*
|
||||||
* When using this option, all of your static asset imports and URLs should add the base as a prefix. You can access this value via `import.meta.env.BASE_URL`.
|
* When using this option, all of your static asset imports and URLs should add the base as a prefix. You can access this value via `import.meta.env.BASE_URL`.
|
||||||
*
|
*
|
||||||
|
* By default, the value of `import.meta.env.BASE_URL` includes a trailing slash. If you have the [`trailingSlash`](https://docs.astro.build/en/reference/configuration-reference/#trailingslash) option set to `'never'`, you will need to add it manually in your static asset imports and URLs.
|
||||||
|
*
|
||||||
* ```astro
|
* ```astro
|
||||||
* <a href="/docs/about/">About</a>
|
* <a href="/docs/about/">About</a>
|
||||||
* <img src=`${import.meta.env.BASE_URL}/image.png`>
|
* <img src=`${import.meta.env.BASE_URL}image.png`>
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
base?: string;
|
base?: string;
|
||||||
|
|
Loading…
Reference in a new issue