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
{
"nav": [
{
"text": "手册",
"link": "/Intro_to_Qianxun/Unboxing_Guide.md"
},
{
"text": "社区首页",
"link": "/https://irobotdeveloper.csdn.net/"
}
],
"sidebar": [
{
"text": "算力底座Infra",
"collapsed": false,
"items": [
{
"text": "初识机器人本体(千寻)",
"collapsed": true,
"items": [
{
"text": "开箱指南",
"link": "/Intro_to_Qianxun/Unboxing_Guide.md"
},
{
"text": "用户操作手册",
"collapsed": false,
"items": [
{
"text": "1.厂家提示",
"link": "/Intro_to_Qianxun/User_Manual/1_Manufacturer_Note.md"
},
{
"text": "2.引言",
"link": "/Intro_to_Qianxun/User_Manual/2_Introduction.md"
},
{
"text": "3.机械设计",
"collapsed": false,
"items": [
{
"text": "3.1安全要求",
"link": "/Intro_to_Qianxun/User_Manual/3_Mechanical_Design/Safety_Requirements.md"
},
{
"text": "3.2机械要求",
"link": "/Intro_to_Qianxun/User_Manual/3_Mechanical_Design/Mechanical_Requirements.md"
}
]
},
{
"text": "4.AGV移动平台",
"link": "/Intro_to_Qianxun/User_Manual/4_AGV_Mobile_Platform.md"
},
{
"text": "5.存储和安装",
"link": "/Intro_to_Qianxun/User_Manual/5_Storage_Installation.md"
},
{
"text": "6.维护",
"link": "/Intro_to_Qianxun/User_Manual/6_Maintenance.md"
},
{
"text": "7.HMI简介",
"link": "/Intro_to_Qianxun/User_Manual/7_HMI_Intro.md"
},
{
"text": "8.开机检查",
"link": "/Intro_to_Qianxun/User_Manual/8_Power-On_Check.md"
},
{
"text": "9.常用功能介绍",
"link": "/Intro_to_Qianxun/User_Manual/9_Common_Functions_Intro.md"
},
{
"text": "10.手柄平板使用说明",
"link": "/Intro_to_Qianxun/User_Manual/10_Gamepad-Tablet_Guide.md"
},
{
"text": "11.故障描述及快速解决",
"link": "/Intro_to_Qianxun/User_Manual/11_Quick_Fix.md"
}
]
},
{
"text": "外部控制模式指南及Capture-X软件使用说明",
"link": "/Intro_to_Qianxun/Out_control.md"
}
]
},
{
"text": "初识开发套件及组网",
"link": "/infra/Development_Kits.md"
}
]
},
{
"text": "模型算法验证",
"collapsed": false,
"items": [
{
"text": "2.VLA算法",
"link": "/model/VLA.md"
},
{
"text": "3.ACT算法(Transformer)",
"link": "/model/ACT.md"
},
{
"text": "4.Diffusion Policy算法",
"link": "/model/Diffusion_Policy.md"
},
{
"text": "5.Yolo+GraspNet算法",
"link": "/model/YoLo_GraspNet.md"
},
{
"text": "6.VLN算法",
"link": "/model/VLN.md"
}
]
},
{
"text": "参考应用demo",
"collapsed": false,
"items": [
{
"text": "1. 千寻机器人本体数采操作",
"link": "/demo/data-collecting.md"
},
{
"text": "3. 参考Demo:叠衣服",
"link": "/demo/dieyifu.md"
}
]
}
],
"socialLinks": [
{
"icon": "手册仓库",
"link": "https://gitcode.com/weixin_43370155/Devpress_Product_Manual"
}
]
}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.