Skip to content

Commit

Permalink
docs: mention clientOnly in definePageMeta
Browse files Browse the repository at this point in the history
  • Loading branch information
logotip4ik committed Jan 3, 2024
1 parent a0e28b9 commit 821a9c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/2.guide/2.directory-structure/1.pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ You may define a name for this page's route.

You may define a path matcher, if you have a more complex pattern than can be expressed with the file name. See [the `vue-router` docs](https://router.vuejs.org/guide/essentials/route-matching-syntax.html#custom-regex-in-params) for more information.

#### `clientOnly`

Will wrap your page in [the Nuxt `<ClientOnly>` component](/docs/api/components/client-only) if you set `clientOnly: true` in your `definePageMeta`. This might be useful if you trying to import library that depends on `window` in page file.

### Typing Custom Metadata

If you add custom metadata for your pages, you may wish to do so in a type-safe way. It is possible to augment the type of the object accepted by `definePageMeta`:
Expand Down

0 comments on commit 821a9c8

Please sign in to comment.