# 全局属性
系统中内置了一些核心的计算属性, 我们也可以自己在上面挂载一些全局属性以供使用
自定义属性需挂载至
$themeConfig下
# $site
{
"title": "docs",
"description": "docs文档系统",
"base": "/",
"pages": [
{
"lastUpdated": 1524027677000,
"path": "/",
"title": "docs文档系统",
"frontmatter": {}
},
...
]
}
# $page
{
"title": "Global Computed",
"frontmatter": {
"sidebar": "auto"
},
"regularPath": "/zh/miscellaneous/global-computed.html",
"key": "v-bc9a3e3f9692d",
"path": "/zh/miscellaneous/global-computed.html",
"headers": [
{
"level": 2,
"title": "$site",
"slug": "site"
},
{
"level": 2,
"title": "$page",
"slug": "page"
},
...
]
}
# $frontmatter
即引用页面 Front Matter (opens new window) 定义的属性
# $themeConfig
即 $site.themeConfig