diff --git a/docs/content/2.guide/3.directory-structure/10.pages.md b/docs/content/2.guide/3.directory-structure/10.pages.md index 0bfa39e4b1..e7a9899efc 100644 --- a/docs/content/2.guide/3.directory-structure/10.pages.md +++ b/docs/content/2.guide/3.directory-structure/10.pages.md @@ -287,6 +287,21 @@ You can define transition properties for the `` component that wraps You can define page aliases. They allow you to access the same page from different paths. It can be either a string or an array of strings as defined [here](https://router.vuejs.org/guide/essentials/redirect-and-alias.html#alias) on vue-router documentation. +### 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`: + +```ts [index.d.ts] +declare module '#app' { + interface PageMeta { + pageType?: string + } +} + +// It is always important to ensure you import/export something when augmenting a type +export {} +``` + ## Navigation To navigate between pages of your app, you should use the [``](/api/components/nuxt-link) component.