From 50387cd83222a4c6338890768ed51d6b3c27e408 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Thu, 29 Dec 2022 10:54:35 -0400 Subject: [PATCH 1/6] [docs] Document base --- packages/astro/src/@types/astro.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index c5839058a800..c6912b605905 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -444,15 +444,22 @@ export interface AstroUserConfig { * @name base * @type {string} * @description - * The base path to deploy to. Astro will build your pages and assets using this path as the root. Currently, this has no effect during development. - * - * You can access this value in your app via `import.meta.env.BASE_URL`. - * + * The base path you're deploying to. Astro will match this pathname during development so that your development experience matches your build environment as closely as possible. You can access this value in your app via `import.meta.env.BASE_URL`. + * + * In the example below, `astro dev` will start your server at `/docs`. + * * ```js * { * base: '/docs' * } * ``` + * + * When using this option, all of your static asset imports and URLs should add the base as a prefix. + * + * ```astro + * + * ``` */ base?: string; From e4fdae0571ac74d5aee543dc534159ab99f910ee Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Thu, 29 Dec 2022 15:08:57 -0400 Subject: [PATCH 2/6] removing spaces --- packages/astro/src/@types/astro.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index c6912b605905..6e332adc7a22 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -445,9 +445,9 @@ export interface AstroUserConfig { * @type {string} * @description * The base path you're deploying to. Astro will match this pathname during development so that your development experience matches your build environment as closely as possible. You can access this value in your app via `import.meta.env.BASE_URL`. - * + * * In the example below, `astro dev` will start your server at `/docs`. - * + * * ```js * { * base: '/docs' From 380cd7deb1a8f636f3a8daf8f36dc676e2df3b6a Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Wed, 4 Jan 2023 16:03:55 -0400 Subject: [PATCH 3/6] one example of each! --- packages/astro/src/@types/astro.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 6e332adc7a22..0c139101c8e2 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -457,8 +457,8 @@ export interface AstroUserConfig { * When using this option, all of your static asset imports and URLs should add the base as a prefix. * * ```astro - * + * About + * * ``` */ base?: string; From d3b18ae5af16bfc5d3d2659d7d0084654772af6a Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Wed, 4 Jan 2023 16:07:22 -0400 Subject: [PATCH 4/6] tightened up wording --- packages/astro/src/@types/astro.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 0c139101c8e2..2ff197f55bde 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -444,7 +444,7 @@ export interface AstroUserConfig { * @name base * @type {string} * @description - * The base path you're deploying to. Astro will match this pathname during development so that your development experience matches your build environment as closely as possible. You can access this value in your app via `import.meta.env.BASE_URL`. + * The base path you're deploying to. Astro will match this pathname during development so that your development experience matches your build environment. * * In the example below, `astro dev` will start your server at `/docs`. * From 5e49e6fc1df7cd8f03ddd470c21a8a7834e8f237 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Wed, 4 Jan 2023 16:07:55 -0400 Subject: [PATCH 5/6] moved `import.meta.env.BASE_URL` closer to the example --- packages/astro/src/@types/astro.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 2ff197f55bde..88d6063d642b 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -454,7 +454,7 @@ export interface AstroUserConfig { * } * ``` * - * When using this option, all of your static asset imports and URLs should add the base as a prefix. + * 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`. * * ```astro * About From 63428e3644641826b640a9384c5135d1cd3532be Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Wed, 4 Jan 2023 16:09:37 -0400 Subject: [PATCH 6/6] less terrible! --- packages/astro/src/@types/astro.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 88d6063d642b..35df52489130 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -444,7 +444,7 @@ export interface AstroUserConfig { * @name base * @type {string} * @description - * The base path you're deploying to. Astro will match this pathname during development so that your development experience matches your build environment. + * The base path to deploy to. Astro will use this path as the root for your pages and assets both in development and in production build. * * In the example below, `astro dev` will start your server at `/docs`. *