More detailed description about useData()
in docs #1515
Open
Description
Is your feature request related to a problem? Please describe.
In the docs, the returned value of useData()
is described as:
interface VitePressData {
site: Ref<SiteData>
page: Ref<PageData>
theme: Ref<any> // themeConfig from .vitepress/config.js
frontmatter: Ref<PageData['frontmatter']>
lang: Ref<string>
title: Ref<string>
description: Ref<string>
localePath: Ref<string>
}
However, for theme
, some of the fields are Proxy
objects, and some of them are raw.
Take @vue/theme
as an example:
These details are not reflected in our docs. This potentially leads users confused when they consume the data.
Describe the solution you'd like
Provide a more detailed description of the return value, and even better, an example.
Describe alternatives you've considered
No response
Additional context
A relevant issue: vuejs/theme#77
Thanks.
Validations
- Follow our Code of Conduct
- Read the docs.
- Read the Contributing Guidelines.
- Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.