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

Commit

Permalink
docs: clarify that definePageMeta only works in the pages directory (
Browse files Browse the repository at this point in the history
…#5663)

Co-authored-by: Daniel Roe <daniel@roe.dev>
  • Loading branch information
donatelloraphael and danielroe authored Jun 30, 2022
1 parent d4b5ff2 commit 568fcae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/content/2.guide/2.features/4.head-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const title = ref('Hello World')

## Example: usage with definePageMeta

You can use `definePageMeta` along with `useHead` to set metadata based on the current route.
Within your `pages/` directory, you can use `definePageMeta` along with `useHead` to set metadata based on the current route.

For example, you can first set the current page title (this is extracted at build time via a macro, so it can't be set dynamically):

Expand All @@ -106,3 +106,5 @@ useHead({
```

:LinkExample{link="/examples/composables/use-head"}

:ReadMore{link="/guide/directory-structure/pages/#page-metadata"}

0 comments on commit 568fcae

Please sign in to comment.