diff --git a/docs/en/guide/data-loading.md b/docs/en/guide/data-loading.md index 1c11e469..c1495f55 100644 --- a/docs/en/guide/data-loading.md +++ b/docs/en/guide/data-loading.md @@ -172,6 +172,21 @@ export default { } ``` +### Importing Page Data Directly + +If you only need data from a few known pages, you can import their generated page data directly instead of creating a content loader: + +```vue + +``` + +This exposes the same `PageData` shape used by [`useData()`](../reference/runtime-api#usedata), including the target page's `frontmatter`, `headers`, `title`, and `description`. For larger collections, prefer `createContentLoader` so VitePress can watch matching files and let you transform or filter the data before it is shipped to the client. + **Types** ```ts