From a2c6db3912a83e63792cdfc6d4985dd4cec007fb Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 17 Dec 2025 17:22:17 +0100 Subject: [PATCH 1/6] reorganize the Integration types reference section --- src/content/docs/en/guides/upgrade-to/v5.mdx | 4 +- .../docs/en/reference/adapter-reference.mdx | 2 +- .../en/reference/integrations-reference.mdx | 50 ++++++++++++------- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/content/docs/en/guides/upgrade-to/v5.mdx b/src/content/docs/en/guides/upgrade-to/v5.mdx index ae8b246b011d7..8b2c6157f1c16 100644 --- a/src/content/docs/en/guides/upgrade-to/v5.mdx +++ b/src/content/docs/en/guides/upgrade-to/v5.mdx @@ -1111,7 +1111,7 @@ function useRoute(route: IntegrationRouteData) { } ``` -See the [API reference for `IntegrationRouteData`](/en/reference/integrations-reference/#integrationroutedata-type-reference). +See the [API reference for `IntegrationRouteData`](/en/reference/integrations-reference/#integrationroutedata). ### Changed: `distURL` is now an array (Integrations API) @@ -1138,7 +1138,7 @@ if (route.distURL) { } ``` -See the [API reference for `IntegrationRouteData`](/en/reference/integrations-reference/#integrationroutedata-type-reference). +See the [API reference for `IntegrationRouteData`](/en/reference/integrations-reference/#integrationroutedata). ### Changed: Arguments passed to `app.render()` (Adapter API) diff --git a/src/content/docs/en/reference/adapter-reference.mdx b/src/content/docs/en/reference/adapter-reference.mdx index a08e35d1b6b25..ea2a4fa8b92d5 100644 --- a/src/content/docs/en/reference/adapter-reference.mdx +++ b/src/content/docs/en/reference/adapter-reference.mdx @@ -480,7 +480,7 @@ If not provided, Astro will fallback to its default behavior for fetching error **Default:** `app.match(request)`

-Provides a value for [`integrationRouteData`](/en/reference/integrations-reference/#integrationroutedata-type-reference) if you already know the route to render. Doing so will bypass the internal call to [`app.match()`](#appmatch) to determine the route to render. +Provides a value for [`integrationRouteData`](/en/reference/integrations-reference/#integrationroutedata) if you already know the route to render. Doing so will bypass the internal call to [`app.match()`](#appmatch) to determine the route to render. ```js "routeData" const routeData = app.match(request); diff --git a/src/content/docs/en/reference/integrations-reference.mdx b/src/content/docs/en/reference/integrations-reference.mdx index b24c204fa85ea..ee0c7e74be78d 100644 --- a/src/content/docs/en/reference/integrations-reference.mdx +++ b/src/content/docs/en/reference/integrations-reference.mdx @@ -614,7 +614,7 @@ If the final value after running all the hooks is `undefined`, the route will fa

-**Type:** [`IntegrationResolvedRoute[]`](#integrationresolvedroute-type-reference) +**Type:** [`IntegrationResolvedRoute[]`](#integrationresolvedroute)

A list of all routes with their associated metadata. @@ -1075,7 +1075,7 @@ export default {

-**Type:** Map\<IntegrationRouteData, URL\>
+**Type:** Map\<IntegrationRouteData, URL\>

@@ -1215,7 +1215,7 @@ This property is deprecated since v5.0. Check the [migration guide](/en/guides/u

-**Type:** [`IntegrationRouteData[]`](#integrationroutedata-type-reference) +**Type:** [`IntegrationRouteData[]`](#integrationroutedata)

A list of all generated routes alongside their associated metadata. @@ -1233,7 +1233,7 @@ You can reference the full `IntegrationRouteData` type below, but the most commo

-Contains URLs to output files paths, grouped by [`IntegrationResolvedRoute`](#integrationresolvedroute-type-reference) `pattern` property. +Contains URLs to output files paths, grouped by [`IntegrationResolvedRoute`](#integrationresolvedroute) `pattern` property. #### `pages` option @@ -1264,6 +1264,18 @@ Astro reserves the `astro:` prefix for future built-in hooks. Please choose a di ## Integration types reference +The following types can be imported from the `astro` module: + +```ts +import type { + AstroIntegrationLogger, + HookParameters, + IntegrationResolvedRoute, + // The following are deprecated: + IntegrationRouteData, +} from "astro"; +``` + ### `AstroIntegrationLogger` An instance of the Astro logger, useful to write logs. This logger uses the same [log level](/en/reference/cli-reference/#--verbose) @@ -1339,7 +1351,7 @@ function mySetup(options: HookParameters<'astro:config:setup'>) { } ``` -### `IntegrationResolvedRoute` type reference +### `IntegrationResolvedRoute` ```ts interface IntegrationResolvedRoute { @@ -1496,10 +1508,12 @@ Allows you to access the route to redirect to. This can be a string or an object Determines if a route comes from Astro core (`internal`), an integration (`external`) or the user's project (`project`). -### `IntegrationRouteData` type reference +### Deprecated type imports + +#### `IntegrationRouteData` :::caution -This type is deprecated since v5.0. Use [`IntegrationResolvedRoute`](#integrationresolvedroute-type-reference) instead. +This type is deprecated since v5.0. Use [`IntegrationResolvedRoute`](#integrationresolvedroute) instead. ::: A smaller version of the `RouteData` that is used in the integrations. @@ -1520,7 +1534,7 @@ interface IntegrationRouteData { } ``` -#### `type` +##### `type`

@@ -1533,7 +1547,7 @@ Allows you to identify the type of the route. The value can be: - `redirect`: a route that points to another route that lives in the file system - `fallback`: a route that doesn't exist in the file system and needs to be handled with other means, usually middleware -#### `component` +##### `component`

@@ -1542,7 +1556,7 @@ Allows you to identify the type of the route. The value can be: Allows you to access the source component URL pathname. -#### `pathname` +##### `pathname`

@@ -1551,7 +1565,7 @@ Allows you to access the source component URL pathname. For regular routes, the value will be the URL pathname where this route will be served. When the project uses [dynamic routes](/en/guides/routing/#dynamic-routes) (ie. `[dynamic]` or `[...spread]`), the pathname will be undefined. -#### `pattern` +##### `pattern`

@@ -1562,7 +1576,7 @@ Allows you to access a regex used for matching an input URL against a requested For example, given a `[fruit]/about.astro` path, the regex will be `/^\/([^/]+?)\/about\/?$/`. Using `pattern.test("banana/about")` will return `true`. -#### `params` +##### `params`

@@ -1571,7 +1585,7 @@ For example, given a `[fruit]/about.astro` path, the regex will be `/^\/([^/]+?) Allows you to access the route `params`. For example, when a project uses the following [dynamic routes](/en/guides/routing/#dynamic-routes) `/pages/[lang]/[...slug].astro`, the value will be `['lang', '...slug']`. -#### `segments` +##### `segments`

@@ -1585,7 +1599,7 @@ Allows you to access the route [`params`](#params-1) with additional metadata. E For example, the following route `/pages/[lang]/index.astro` will output the segments `[[ { content: 'lang', dynamic: true, spread: false } ]]`. -#### `generate()` +##### `generate()`

@@ -1600,7 +1614,7 @@ For example, with a route such as `/blog/[...id].astro`, the `generate` function console.log(generate({ id: 'presentation' })) // will log `/blog/presentation` ``` -#### `prerender` +##### `prerender`

@@ -1609,7 +1623,7 @@ console.log(generate({ id: 'presentation' })) // will log `/blog/presentation` Determines whether the route is prerendered or not. -#### `distURL` +##### `distURL`

@@ -1618,7 +1632,7 @@ Determines whether the route is prerendered or not. The paths of the physical files emitted by this route. When a route **isn't** prerendered, the value is either `undefined` or an empty array. -#### `redirect` +##### `redirect`

@@ -1627,7 +1641,7 @@ The paths of the physical files emitted by this route. When a route **isn't** pr Allows you to access the route to redirect to. This can be a string or an object containing information about the status code and its destination. -#### `redirectRoute` +##### `redirectRoute`

From e744bc1ceb1b4fea9ca8beda623a119c8e468db0 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 17 Dec 2025 18:59:59 +0100 Subject: [PATCH 2/6] add docs for `RouteData` and related types --- .../en/reference/integrations-reference.mdx | 246 +++++++++++------- 1 file changed, 145 insertions(+), 101 deletions(-) diff --git a/src/content/docs/en/reference/integrations-reference.mdx b/src/content/docs/en/reference/integrations-reference.mdx index ee0c7e74be78d..9e16c7779c990 100644 --- a/src/content/docs/en/reference/integrations-reference.mdx +++ b/src/content/docs/en/reference/integrations-reference.mdx @@ -1271,6 +1271,11 @@ import type { AstroIntegrationLogger, HookParameters, IntegrationResolvedRoute, + RedirectConfig, + RouteData, + RoutePart, + RouteType, + ValidRedirectStatus, // The following are deprecated: IntegrationRouteData, } from "astro"; @@ -1353,20 +1358,18 @@ function mySetup(options: HookParameters<'astro:config:setup'>) { ### `IntegrationResolvedRoute` +A subset of [`RouteData`](#routedata) with remapped properties. + ```ts -interface IntegrationResolvedRoute { +interface IntegrationResolvedRoute extends Pick< + RouteData, + 'generate' | 'params' | 'pathname' | 'segments' | 'type' | 'redirect' | 'origin' + > & { pattern: RouteData['route']; patternRegex: RouteData['pattern']; entrypoint: RouteData['component']; isPrerendered: RouteData['prerender']; redirectRoute?: IntegrationResolvedRoute; - generate: (data?: any) => string; - params: string[]; - pathname?: string; - segments: RoutePart[][]; - type: RouteType; - redirect?: RedirectConfig; - origin: 'internal' | 'external' | 'project'; } ``` @@ -1374,7 +1377,7 @@ interface IntegrationResolvedRoute {

-**Type:** `string` +**Type:** [`RouteData['route']`](#route)

Allows you to identify the type of route based on its path. Here are some examples of paths associated with their pattern: @@ -1386,7 +1389,7 @@ Allows you to identify the type of route based on its path. Here are some exampl

-**Type:** `RegExp` +**Type:** [`RouteData['pattern']`](#pattern-1)

Allows you to access a regex used for matching an input URL against a requested route. @@ -1397,7 +1400,7 @@ For example, given a `[fruit]/about.astro` path, the regex will be `/^\/([^/]+?)

-**Type:** `string` +**Type:** [`RouteData['component']`](#component)

The URL pathname of the source component. @@ -1406,7 +1409,7 @@ The URL pathname of the source component.

-**Type:** `boolean` +**Type:** [`RouteData['prerender']`](#prerender)

Determines whether the route use [on demand rendering](/en/guides/on-demand-rendering/). The value will be `true` for projects configured with: @@ -1422,19 +1425,53 @@ Determines whether the route use [on demand rendering](/en/guides/on-demand-rend When the value of `IntegrationResolvedRoute.type` is `redirect`, the value will be the `IntegrationResolvedRoute` to redirect to. Otherwise, the value will be undefined. +### `RedirectConfig` + +

+ +**Type:** string | \{ status: ValidRedirectStatus; destination: string; \} +

+ +Describes the destination of a redirect. This can be a string or an object containing information about the status code and its destination. + +### `RouteData` + +Describes the information about a route. This contains the following properties: + +#### `route` + +

+ +**Type:** `string` +

+ +Defines the current route pattern. Here are some examples of paths associated with their pattern: +* `src/pages/index.astro` will be `/` +* `src/pages/blog/[...slug].astro` will be `/blog/[...slug]` +* `src/pages/site/[blog]/[...slug].astro` will be `/site/[blog]/[...slug]` + +#### `component` + +

+ +**Type:** `string` +

+ +Specifies the source component URL. + #### `generate()`

-**Type:** `(data?: any) => string` +**Type:** `(data?: any) => string;`

A function that provides the optional parameters of the route, interpolates them with the route pattern, and returns the path name of the route. -For example, with a route such as `/blog/[...id].astro`, the `generate` function could return: +For example, with a route such as `/blog/[...id].astro`, the `generate()` function could return: ```js -console.log(generate({ id: 'presentation' })) // will log `/blog/presentation` +generate({ id: 'presentation' }) // will output `/blog/presentation` ``` #### `params` @@ -1455,14 +1492,35 @@ Allows you to access the route `params`. For example, when a project uses the fo For regular routes, the value will be the URL pathname where this route will be served. When the project uses [dynamic routes](/en/guides/routing/#dynamic-routes) (ie. `[dynamic]` or `[...spread]`), the pathname will be undefined. +#### `distURL` + +

+ +**Type:** `URL[] | undefined`
+ +

+ +Defines the paths of the physical files emitted by this route. When a route isn't prerendered, the value is either `undefined` or an empty array. + +#### `pattern` + +

+ +**Type:** `RegExp` +

+ +Specifies a regex to use for matching an input URL against a requested route. + +For example, given a `[fruit]/about.astro` path, the regex will be `/^\/([^/]+?)\/about\/?$/`. Using `pattern.test("banana/about")` will return `true`. + #### `segments`

-**Type:** RoutePart[][] +**Type:** RoutePart[][]

-Allows you to access the route [`params`](#params) with additional metadata. Each object contains the following properties: +Allows you to access the route [`params`](#params-1) with additional metadata. Each object contains the following properties: * `content`: the `param` name, * `dynamic`: whether the route is dynamic or not, * `spread`: whether the dynamic route uses the spread syntax or not. @@ -1481,165 +1539,151 @@ For example, the following route `/pages/[blog]/[...slug].astro` will output the

-**Type:** `RouteType` +**Type:** [`RouteType`](#routetype)

-Allows you to identify the type of route. Possible values are: -* `page`: a route that lives in the file system, usually an Astro component -* `endpoint`: a route that lives in the file system, usually a JS file that exposes endpoints methods -* `redirect`: a route points to another route that lives in the file system -* `fallback`: a route that doesn't exist in the file system that needs to be handled with other means, usually the middleware +Allows you to identify the [type of route](#routetype). -#### `redirect` +#### `prerender`

-**Type:** RedirectConfig | undefined +**Type:** `boolean`

-Allows you to access the route to redirect to. This can be a string or an object containing information about the status code and its destination. +Determines whether the route use [on demand rendering](/en/guides/on-demand-rendering/). The value will be `true` for projects configured with: +* `output: 'static'` when the route does not export `const prerender = true` +* `output: 'server'` when the route exports `const prerender = false` -#### `origin` +#### `redirect`

-**Type:** `'internal' | 'external' | 'project'` +**Type:** RedirectConfig | undefined

-Determines if a route comes from Astro core (`internal`), an integration (`external`) or the user's project (`project`). - -### Deprecated type imports +Allows you to access the route to redirect to. -#### `IntegrationRouteData` +#### `redirectRoute` -:::caution -This type is deprecated since v5.0. Use [`IntegrationResolvedRoute`](#integrationresolvedroute) instead. -::: +

-A smaller version of the `RouteData` that is used in the integrations. +**Type:** `RouteData | undefined` +

-```ts -interface IntegrationRouteData { - type: RouteType; - component: string; - pathname?: string; - pattern: RegExp; - params: string[]; - segments: { content: string; dynamic: boolean; spread: boolean; }[][]; - generate: (data?: any) => string; - prerender: boolean; - distURL?: URL[]; - redirect?: RedirectConfig; - redirectRoute?: IntegrationRouteData; -} -``` +Specifies the `RouteData` to redirect to when [`RouteData.type`](#type) is `redirect`. -##### `type` +#### `fallbackRoutes`

-**Type:** `RouteType` +**Type:** `RouteData[]`
+

-Allows you to identify the type of the route. The value can be: -- `page`: a route that lives in the file system, usually an Astro component -- `endpoint`: a route that lives in the file system, usually a JS file that exposes endpoints methods -- `redirect`: a route that points to another route that lives in the file system -- `fallback`: a route that doesn't exist in the file system and needs to be handled with other means, usually middleware +Defines a list of `RouteData` to fallback to when [`i18n.fallback`](/en/reference/configuration-reference/#i18nfallback) has a list of locales. -##### `component` +#### `isIndex`

-**Type:** `string` +**Type:** `boolean`

-Allows you to access the source component URL pathname. +Specifies if the route is a directory index (e.g. `src/pages/index.astro`, `src/pages/blog/index.astro`). -##### `pathname` +#### `origin`

-**Type:** `string | undefined` +**Type:** `'internal' | 'external' | 'project'`
+

-For regular routes, the value will be the URL pathname where this route will be served. When the project uses [dynamic routes](/en/guides/routing/#dynamic-routes) (ie. `[dynamic]` or `[...spread]`), the pathname will be undefined. +Determines if a route comes from Astro core (`internal`), an integration (`external`) or the user's project (`project`). -##### `pattern` +### `RoutePart`

-**Type:** `RegExp` +**Type:** `{ content: string; dynamic: boolean; spread: boolean; }`

-Allows you to access a regex used for matching an input URL against a requested route. - -For example, given a `[fruit]/about.astro` path, the regex will be `/^\/([^/]+?)\/about\/?$/`. Using `pattern.test("banana/about")` will return `true`. +Describes a route segment. This contains the following properties: -##### `params` +#### `content`

-**Type:** `string[]` +**Type:** `string`

-Allows you to access the route `params`. For example, when a project uses the following [dynamic routes](/en/guides/routing/#dynamic-routes) `/pages/[lang]/[...slug].astro`, the value will be `['lang', '...slug']`. +Specifies the parameter name for the route. For example: +* `about.astro` would have a `about` param name +* `[slug].astro` would have a `slug` param name +* `[...id].astro` would have a `id` param name -##### `segments` +#### `dynamic`

-**Type:** `{ content: string; dynamic: boolean; spread: boolean; }[][]` +**Type:** `boolean`

-Allows you to access the route [`params`](#params-1) with additional metadata. Each object contains the following properties: -* `content`: the `param`, -* `dynamic`: whether the route is dynamic or not, -* `spread`: whether the dynamic route uses the spread syntax or not. - -For example, the following route `/pages/[lang]/index.astro` will output the segments `[[ { content: 'lang', dynamic: true, spread: false } ]]`. +Whether the route is dynamic or not. -##### `generate()` +#### `spread`

-**Type:** `(data?: any) => string` +**Type:** `boolean`

-A function that provides the optional parameters of the route, interpolates them with the route pattern, and returns the path name of the route. - -For example, with a route such as `/blog/[...id].astro`, the `generate` function could return: +Whether the dynamic route uses the spread syntax or not. -```js -console.log(generate({ id: 'presentation' })) // will log `/blog/presentation` -``` - -##### `prerender` +### `RouteType`

-**Type:** `boolean` +**Type:** `'page' | 'endpoint' | 'redirect' | 'fallback'`

-Determines whether the route is prerendered or not. +A union of supported route types: + +* `page`: a route that lives in the file system, usually an Astro component +* `endpoint`: a route that lives in the file system, usually a JS file that exposes endpoints methods +* `redirect`: a route points to another route that lives in the file system +* `fallback`: a route that doesn't exist in the file system that needs to be handled with other means, usually the middleware -##### `distURL` +### `ValidRedirectStatus`

-**Type:** `URL[] | undefined` +**Type:** `301 | 302 | 303 | 307 | 308 | 300 | 304`

-The paths of the physical files emitted by this route. When a route **isn't** prerendered, the value is either `undefined` or an empty array. +A union of supported redirect status code. -##### `redirect` +### Deprecated type imports -

+The following types are deprecated and will be removed in a future major version: -**Type:** RedirectConfig | undefined -

+#### `IntegrationRouteData` + +:::caution +This type is deprecated since v5.0. Use [`IntegrationResolvedRoute`](#integrationresolvedroute) instead. +::: + +A smaller version of the [`RouteData`](#routedata) that is used in the integrations. -Allows you to access the route to redirect to. This can be a string or an object containing information about the status code and its destination. +```ts +type IntegrationRouteData = Omit< + RouteData, + 'isIndex' | 'fallbackRoutes' | 'redirectRoute' | 'origin' +> & { + redirectRoute?: IntegrationRouteData; +}; +``` ##### `redirectRoute` @@ -1648,7 +1692,7 @@ Allows you to access the route to redirect to. This can be a string or an object **Type:** `IntegrationRouteData | undefined`

-When the value of `RouteData.type` is `redirect`, the value will contains the `IntegrationRouteData` of the route to redirect to. Otherwise, the value will be undefined. +When the value of [`RouteData.type`](#type) is `redirect`, the value will contains the `IntegrationRouteData` of the route to redirect to. Otherwise, the value will be undefined. ## Allow installation with `astro add` From 453b5efea00402d91caba633e740d10fa58ea151 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 17 Dec 2025 19:39:31 +0100 Subject: [PATCH 3/6] fix #12789 --- src/content/docs/en/reference/adapter-reference.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/en/reference/adapter-reference.mdx b/src/content/docs/en/reference/adapter-reference.mdx index ea2a4fa8b92d5..7313348ed0cb4 100644 --- a/src/content/docs/en/reference/adapter-reference.mdx +++ b/src/content/docs/en/reference/adapter-reference.mdx @@ -476,11 +476,11 @@ If not provided, Astro will fallback to its default behavior for fetching error

-**Type:** `RouteData`
+**Type:** [`RouteData`](/en/reference/integrations-reference/#routedata)
**Default:** `app.match(request)`

-Provides a value for [`integrationRouteData`](/en/reference/integrations-reference/#integrationroutedata) if you already know the route to render. Doing so will bypass the internal call to [`app.match()`](#appmatch) to determine the route to render. +Defines the information about a route. This is useful when you already know the route to render. Doing so will bypass the internal call to [`app.match()`](#appmatch) to determine the route to render. ```js "routeData" const routeData = app.match(request); From f8738b91de8cc96fdea00c90feca07c58ee7242b Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 17 Dec 2025 19:44:02 +0100 Subject: [PATCH 4/6] fix link --- src/content/docs/en/reference/integrations-reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/reference/integrations-reference.mdx b/src/content/docs/en/reference/integrations-reference.mdx index 9e16c7779c990..f0b04af397424 100644 --- a/src/content/docs/en/reference/integrations-reference.mdx +++ b/src/content/docs/en/reference/integrations-reference.mdx @@ -1520,7 +1520,7 @@ For example, given a `[fruit]/about.astro` path, the regex will be `/^\/([^/]+?) **Type:** RoutePart[][]

-Allows you to access the route [`params`](#params-1) with additional metadata. Each object contains the following properties: +Allows you to access the route [`params`](#params) with additional metadata. Each object contains the following properties: * `content`: the `param` name, * `dynamic`: whether the route is dynamic or not, * `spread`: whether the dynamic route uses the spread syntax or not. From 001fad11b21ed40f0a36cbbf578c08515400b6cc Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 17 Dec 2025 20:08:48 +0100 Subject: [PATCH 5/6] remove an extra semicolon --- src/content/docs/en/reference/integrations-reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/reference/integrations-reference.mdx b/src/content/docs/en/reference/integrations-reference.mdx index f0b04af397424..b46e49138b5da 100644 --- a/src/content/docs/en/reference/integrations-reference.mdx +++ b/src/content/docs/en/reference/integrations-reference.mdx @@ -1463,7 +1463,7 @@ Specifies the source component URL.

-**Type:** `(data?: any) => string;` +**Type:** `(data?: any) => string`

A function that provides the optional parameters of the route, interpolates them with the route pattern, and returns the path name of the route. From eeaa955a9b3ac24294df74478bd1799d7b9fab0b Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 18 Dec 2025 17:45:02 +0100 Subject: [PATCH 6/6] Apply Sarah's improvements Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> --- .../docs/en/reference/integrations-reference.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content/docs/en/reference/integrations-reference.mdx b/src/content/docs/en/reference/integrations-reference.mdx index b46e49138b5da..d7b824679d128 100644 --- a/src/content/docs/en/reference/integrations-reference.mdx +++ b/src/content/docs/en/reference/integrations-reference.mdx @@ -1551,9 +1551,9 @@ Allows you to identify the [type of route](#routetype). **Type:** `boolean`

-Determines whether the route use [on demand rendering](/en/guides/on-demand-rendering/). The value will be `true` for projects configured with: -* `output: 'static'` when the route does not export `const prerender = true` -* `output: 'server'` when the route exports `const prerender = false` +Determines whether a route uses [on demand rendering](/en/guides/on-demand-rendering/) or is statically prerendered at build time. + +See also [`prerendered`](/en/reference/routing-reference/#prerender) in the routing reference. #### `redirect` @@ -1619,9 +1619,9 @@ Describes a route segment. This contains the following properties:

Specifies the parameter name for the route. For example: -* `about.astro` would have a `about` param name -* `[slug].astro` would have a `slug` param name -* `[...id].astro` would have a `id` param name +* `about.astro` has the name `about` +* `[slug].astro` has the name `slug` +* `[...id].astro` has the name `id` #### `dynamic` @@ -1653,7 +1653,7 @@ A union of supported route types: * `page`: a route that lives in the file system, usually an Astro component * `endpoint`: a route that lives in the file system, usually a JS file that exposes endpoints methods * `redirect`: a route points to another route that lives in the file system -* `fallback`: a route that doesn't exist in the file system that needs to be handled with other means, usually the middleware +* `fallback`: a route that doesn't exist in the file system that needs to be handled with other means, usually a middleware ### `ValidRedirectStatus`