Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
docs: add back deleted sections in definePageMeta
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 11, 2022
1 parent 5f003a9 commit c804daa
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions docs/content/3.api/3.utils/define-page-meta.md
Expand Up @@ -44,42 +44,56 @@ interface PageMeta {

An object accepting the following page metadata:

**`pageTransition`**
- **Type**: `boolean` | [`TransitionProps`](https://vuejs.org/api/built-in-components.html#transition)
**`alias`**

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

Set name of the transition to apply for current page. You can also set this value to `false` to disable the page transition.
Aliases for the record. Allows defining extra paths that will behave like a copy of the record. Allows having paths shorthands like `/users/:id` and `/u/:id`. All `alias` and `path` values must share the same params.

**`layoutTransition`**
**`keepalive`**

- **Type**: `boolean` | [`TransitionProps`](https://vuejs.org/api/built-in-components.html#transition)
- **Type**: `boolean` | [`KeepAliveProps`](https://vuejs.org/api/built-in-components.html#keepalive)

Set name of the transition to apply for current layout. You can also set this value to `false` to disable the layout transition.
Set to `true` when you want to preserve page state across route changes or use the [`KeepAliveProps`](https://vuejs.org/api/built-in-components.html#keepalive) for a fine-grained control.

**`key`**

- **Type**: `false` | `string` | `((route: RouteLocationNormalizedLoaded) => string)`

Set `key` value when you need more control over when the `<NuxtPage>` component is re-rendered.

**`keepalive`**

- **Type**: `boolean` | [`KeepAliveProps`](https://vuejs.org/api/built-in-components.html#keepalive)

Set to `true` when you want to preserve page state across route changes or use the [`KeepAliveProps`](https://vuejs.org/api/built-in-components.html#keepalive) for a fine-grained control.

**`layout`**

- **Type**: `false` | `LayoutKey` | `Ref<LayoutKey>` | `ComputedRef<LayoutKey>`

Set a static or dynamic name of the layout for each route. This can be set to `false` in case the default layout needs to be disabled.

**`layoutTransition`**

- **Type**: `boolean` | [`TransitionProps`](https://vuejs.org/api/built-in-components.html#transition)

Set name of the transition to apply for current layout. You can also set this value to `false` to disable the layout transition.

**`middleware`**

- **Type**: `MiddlewareKey` | [`NavigationGuard`](https://router.vuejs.org/api/interfaces/NavigationGuard.html#navigationguard) | `Array<MiddlewareKey | NavigationGuard>`

Define anonymous or named middleware directly within `definePageMeta`. Learn more about [route middleware](/docs/directory-structure/middleware).

**`pageTransition`**

- **Type**: `boolean` | [`TransitionProps`](https://vuejs.org/api/built-in-components.html#transition)

Set name of the transition to apply for current page. You can also set this value to `false` to disable the page transition.

**`redirect`**

- **Type**: [`RouteRecordRedirectOption`](https://router.vuejs.org/guide/essentials/redirect-and-alias.html#redirect-and-alias)

Where to redirect if the route is directly matched. The redirection happens before any navigation guard and triggers a new navigation with the new target location.

:StabilityEdge

**`validate`**

- **Type**: `(route: RouteLocationNormalized) => boolean | Promise<boolean> | Partial<NuxtError> | Promise<Partial<NuxtError>>`
Expand Down

0 comments on commit c804daa

Please sign in to comment.