Skip to content

Commit 79cc9b5

Browse files
committed
docs: move global-computed to guide
1 parent 8003425 commit 79cc9b5

File tree

7 files changed

+8
-15
lines changed

7 files changed

+8
-15
lines changed

packages/docs/docs/.vuepress/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ function getGuideSidebar (groupA, groupB) {
111111
children: [
112112
'frontmatter',
113113
'permalinks',
114-
'markdown-slot'
114+
'markdown-slot',
115+
'global-computed'
115116
]
116117
}
117118
]

packages/docs/docs/guide/frontmatter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ lang: en-US
99
---
1010
```
1111

12-
Between these triple-dashed lines, you can set predefined variables (see [below](#predefined-global-variables) for a reference), or even create custom ones of your own. These variables will then be available to you to access using <code>[$frontmatter](../miscellaneous/global-computed.md#frontmatter)</code> at the rest of the page, plus all custom and theming components.
12+
Between these triple-dashed lines, you can set predefined variables (see [below](#predefined-variables) for a reference), or even create custom ones of your own. These variables will then be available to you to access using <code>[$frontmatter](./global-computed.md#frontmatter)</code> at the rest of the page, plus all custom and theming components.
1313

1414
::: tip
1515
Front matter variables are **optional** in VuePress.

packages/docs/docs/miscellaneous/global-computed.md renamed to packages/docs/docs/guide/global-computed.md

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
sidebar: auto
3-
---
4-
51
# Global Computed
62

73
In VuePress, some core [computed](https://vuejs.org/v2/guide/computed.html#Computed-Properties) properties are built in for use by [default theme](../theme/default-theme-config.md) or custom themes.

packages/docs/docs/zh/guide/frontmatter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ lang: en-US
99
---
1010
```
1111

12-
在这些三条虚线之间,你可以设置预定义变量(参见[下面](#预定义变量)),甚至可以创建自己的自定义变量。 然后,您可以使用 <code> [$frontmatter](../miscellaneous/global-computed.md#frontmatter)</code> 在页面的其余部分、以及所有的自定义和主题组件访问这些变量。
12+
在这些三条虚线之间,你可以设置预定义变量(参见[下面](#预定义变量)),甚至可以创建自己的自定义变量。 然后,您可以使用 <code> [$frontmatter](global-computed.md#frontmatter)</code> 在页面的其余部分、以及所有的自定义和主题组件访问这些变量。
1313

1414
::: tip
1515
在 VuePress 中,Front matter 是 **可选的**

packages/docs/docs/zh/miscellaneous/global-computed.md renamed to packages/docs/docs/zh/guide/global-computed.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
sidebar: auto
3-
---
4-
51
# 全局计算属性
62

73
在 VuePress 中,内置了一些核心的[计算属性](https://cn.vuejs.org/v2/guide/computed.html#%E8%AE%A1%E7%AE%97%E5%B1%9E%E6%80%A7),以供[默认主题](../theme/default-theme-config.md) 或自定义主题使用。
@@ -66,15 +62,15 @@ sidebar: auto
6662

6763
**参考:**
6864

69-
- [多语言支持](../guide/i18n.md)
65+
- [多语言支持](i18n.md)
7066

7167
## $localePath
7268

7369
当前页面的 locale 路径前缀,默认值为 `/`,当前页面为 `/zh/`
7470

7571
**参考:**
7672

77-
- [多语言支持](../guide/i18n.md)
73+
- [多语言支持](i18n.md)
7874

7975
## $title
8076

packages/docs/docs/zh/plugin/option-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ import { SOURCE_DIR } from '@dynamic/constans'
289289
- 类型: `Function`
290290
- 默认值: `undefined`
291291

292-
一个函数,用于拓展或者修改 [$page](../miscellaneous/global-computed.md#page) 对象。这个函数将会在编译器为每个页面执行一次。
292+
一个函数,用于拓展或者修改 [$page](../guide/global-computed.md#page) 对象。这个函数将会在编译器为每个页面执行一次。
293293

294294
```js
295295
module.exports = {

packages/docs/docs/zh/theme/writing-a-theme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ module.exports = {
163163

164164
**参考:**
165165

166-
- [全局计算属性](../miscellaneous/global-computed.md).
166+
- [全局计算属性](../guide/global-computed.md).
167167

168168

169169
## 应用配置

0 commit comments

Comments
 (0)