docs: clarify that definePageMeta only works in the pages directory (#5663)

Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
donatelloraphael 2022-06-30 15:07:24 +05:30 committed by GitHub
parent d4b5ff2d9d
commit 568fcaedfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):
@ -106,3 +106,5 @@ useHead({
```
:LinkExample{link="/examples/composables/use-head"}
:ReadMore{link="/guide/directory-structure/pages/#page-metadata"}