Appearance
Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:
md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>Results
Theme Data
{
"logo": "/img/livoltek-logo.png",
"search": {
"provider": "local"
},
"nav": [
{
"text": "主页",
"link": "/"
},
{
"text": "驱动",
"link": "/docs/HXLVBMSTool/drivers"
},
{
"text": "HXLVBMSTool",
"link": "/docs/HXLVBMSTool"
},
{
"text": "HXHVBMSTool",
"link": "/docs/HXHVBMSTool"
},
{
"text": "LTKTools",
"link": "/docs/LTKTools"
},
{
"text": "关于",
"link": "/docs/About"
}
],
"sidebar": {
"/docs/HXLVBMSTool/": [
{
"text": "HXLVBMSTool",
"collapsed": false,
"items": [
{
"text": "概览",
"link": "/docs/HXLVBMSTool/"
},
{
"text": "使用指南",
"link": "/docs/HXLVBMSTool/guide"
},
{
"text": "驱动下载",
"link": "/docs/HXLVBMSTool/drivers"
},
{
"text": "更新日志",
"link": "/docs/HXLVBMSTool/changelog"
}
]
}
],
"/docs/HXHVBMSTool/": [
{
"text": "HXHVBMSTool",
"collapsed": false,
"items": [
{
"text": "概览",
"link": "/docs/HXHVBMSTool/"
},
{
"text": "使用指南",
"link": "/docs/HXHVBMSTool/guide"
},
{
"text": "驱动下载",
"link": "/docs/HXHVBMSTool/drivers"
},
{
"text": "更新日志",
"link": "/docs/HXHVBMSTool/changelog"
},
{
"text": "并机上位机",
"collapsed": false,
"items": [
{
"text": "概览",
"link": "/docs/HXHVBMSTool/Parallel/"
},
{
"text": "使用指南",
"link": "/docs/HXHVBMSTool/Parallel/guide"
},
{
"text": "更新日志",
"link": "/docs/HXHVBMSTool/Parallel/changelog"
}
]
},
{
"text": "升级上位机",
"collapsed": false,
"items": [
{
"text": "概览",
"link": "/docs/HXHVBMSTool/Update/"
},
{
"text": "使用指南",
"link": "/docs/HXHVBMSTool/Update/guide"
},
{
"text": "更新日志",
"link": "/docs/HXHVBMSTool/Update/changelog"
}
]
}
]
},
{
"text": "HXHVBMSTool_V2.1",
"collapsed": false,
"items": [
{
"text": "概览",
"link": "/docs/HXHVBMSToolV2.1/"
}
]
}
],
"/docs/LTKTools/": [
{
"text": "LTKTools",
"collapsed": false,
"items": [
{
"text": "概览",
"link": "/docs/LTKTools/"
},
{
"text": "使用指南",
"link": "/docs/LTKTools/guide"
},
{
"text": "更新日志",
"link": "/docs/LTKTools/changelog"
}
]
}
]
},
"footer": {
"copyright": "© 2026 Livoltek Power · 个人学习项目",
"message": "本工具不可替代专业检测设备,关键场景请以官方认证工具为准。本网站及配套工具由个人学习开发,非海兴 / Livoltek 官方网站"
}
}Page Data
{
"title": "Runtime API Examples",
"description": "",
"frontmatter": {
"outline": "deep"
},
"headers": [],
"relativePath": "api-examples.md",
"filePath": "api-examples.md"
}Page Frontmatter
{
"outline": "deep"
}More
Check out the documentation for the full list of runtime APIs.
