diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js
index f4e3f83f..ca10e3c7 100644
--- a/docs/.vitepress/config.js
+++ b/docs/.vitepress/config.js
@@ -44,8 +44,8 @@ function getGuideSidebar() {
text: 'Advanced',
children: [
{ text: 'Frontmatter', link: '/guide/frontmatter' },
- { text: 'Customization', link: '/guide/customization' },
- { text: 'Global Computed', link: '/guide/global-computed' }
+ { text: 'Global Computed', link: '/guide/global-computed' },
+ { text: 'Customization', link: '/guide/customization' }
]
}
]
diff --git a/docs/guide/frontmatter.md b/docs/guide/frontmatter.md
index bc7ad57e..71f28bee 100644
--- a/docs/guide/frontmatter.md
+++ b/docs/guide/frontmatter.md
@@ -9,7 +9,7 @@ editLink: true
---
```
-Between the triple-dashed lines, you can set [predefined variables](#predefined-variables), or even create custom ones of your own. These variables can be used via the \$frontmatter
variable.
+Between the triple-dashed lines, you can set [predefined variables](#predefined-variables), or even create custom ones of your own. These variables can be used via the $frontmatter
variable.
Here’s an example of how you could use it in your Markdown file:
diff --git a/docs/guide/global-computed.md b/docs/guide/global-computed.md
index 0d58f3cb..7221534a 100644
--- a/docs/guide/global-computed.md
+++ b/docs/guide/global-computed.md
@@ -1,57 +1,66 @@
# Global Computed
-In VitePress, some core [computed properties](https://v3.vuejs.org/guide/computed.html#computed-properties) can be used by the default theme or custom themes. Or directly in Markdown pages using vue, for example using `{{ $frontmatter.title }}` to access the title defined in the frontmatter section of the page.
+In VitePress, some core [computed properties](https://v3.vuejs.org/guide/computed.html#computed-properties) can be used by the default theme or custom themes. Or directly in Markdown pages using vue, for example using `$frontmatter.title` to access the title defined in the frontmatter section of the page.
## $site
-This is the `$site` value of the site you’re currently reading:
+This is the `$site` value of the site you're currently reading:
-```json
+```js
{
- "title": "VitePress",
- "description": "Vite & Vue powered static site generator.",
- "lang": "en-US",
- "locales": {},
- "base": "/",
- "head": [],
- "themeConfig: $themeConfig
+ base: '/',
+ lang: 'en-US',
+ title: 'VitePress',
+ description: 'Vite & Vue powered static site generator.',
+ head: [],
+ locales: {},
+ themeConfig: $themeConfig
+}
+```
+
+## $themeConfig
+
+Refers to `$site.themeConfig`.
+
+```js
+{
+ locales: {},
+ repo: 'vuejs/vitepress',
+ docsDir: 'docs',
+ editLinks: true,
+ editLinkText: 'Edit this page on GitHub',
+ lastUpdated: 'Last Updated',
+ nav: [...],
+ sidebar: { ... }
}
```
## $page
-This is the `$page` value of the page you’re currently reading:
+This is the `$page` value of the page you're currently reading:
-```json
+```js
{
- "title": "Global Computed",
- "relativePath": "guide/global-computed.md",
- "lastUpdated": 1606297645000
- "headers": [
- {
- "level": 2,
- "title": "$site",
- "slug": "site"
- },
- {
- "level": 2,
- "title": "$page",
- "slug": "$page"
- },
+ relativePath: 'guide/global-computed.md',
+ title: 'Global Computed',
+ headers: [
+ { level: 2, title: '$site', slug: 'site' },
+ { level: 2, title: '$page', slug: '$page' },
...
],
- "frontmatter": $frontmatter,
+ frontmatter: $frontmatter,
+ lastUpdated: 1606297645000
}
```
## $frontmatter
-Reference of [$page](#page).frontmatter.
+Reference of `$page.frontmatter`.
-```json
+```js
{
- "title": "Docs with VitePress",
- "editLink": true
+ title: 'Docs with VitePress',
+ editLink: true
}
```
@@ -62,52 +71,3 @@ Value of the `