Skip to content

Commit b358336

Browse files
committed
refactor: address comments
1 parent d49cb25 commit b358336

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

Diff for: packages/@vuepress/core/lib/theme-api/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = class ThemeAPI {
2222

2323
init () {
2424
const alias = {
25+
'@theme': this.theme.path,
2526
'@current-theme': this.theme.path
2627
}
2728
if (this.existsParentTheme) {

Diff for: packages/docs/docs/miscellaneous/glossary.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ That is, those titles defined by one or more `#` in `markdown`.
4848

4949
## themeConfig
5050

51-
- Access: `$site | Context.themeConfig`
51+
- Access: `$themeConfig | Context.themeConfig`
5252

53-
Value of `themeConfig` in `.vuepress/config.js`, i.e., `user's theme configuration`.
53+
Value of `themeConfig` in `.vuepress/config.js`, i.e., user's theme configuration.
5454

5555
## themePath
5656

@@ -70,7 +70,7 @@ Theme's configuration file - `themePath/index.js`.
7070

7171
If the current theme is a derived theme, `parentThemePath` refers to the absolute path of the parent theme.
7272

73-
## parentThemeNetry
73+
## parentThemeEntry
7474

7575
- Access: `Context.themeAPI.parentTheme.entry`
7676

Diff for: packages/docs/docs/theme/inheritance.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ On this premise, when you create a `Navbar` component in the same place in the c
138138

139139
::: vue
140140
theme
141-
└── components
141+
└── components
142142
   └── `Navbar.vue`
143143
:::
144144

Diff for: packages/docs/docs/zh/miscellaneous/glossary.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ sidebar: auto
5050

5151
## themeConfig
5252

53-
- Access: `$site | Context.themeConfig`
53+
- Access: `$themeConfig | Context.themeConfig`
5454

5555
`.vuepress/config.js``themeConfig` 的值,是用户对当前所使用的主题的配置。
5656

@@ -72,7 +72,7 @@ sidebar: auto
7272

7373
如果当前使用的主题是一个派生主题,那么 `parentThemePath` 就是指父主题的所在绝对路径。
7474

75-
## parentThemeNetry
75+
## parentThemeEntry
7676

7777
- Access: `Context.themeAPI.parentTheme.entry`
7878

Diff for: packages/docs/docs/zh/theme/inheritance.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ import Home from '@theme/components/Navbar.vue'
137137

138138
::: vue
139139
theme
140-
└── components
140+
└── components
141141
   └── `Navbar.vue`
142142
:::
143143

Diff for: packages/docs/docs/zh/theme/using-a-theme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
使用一个主题和使用一个插件的方式几乎一致。
44

5-
## 使用来自依赖的插件
5+
## 使用来自依赖的主题
66

77
一个主题可以在以 `vuepress-theme-xxx` 的形式发布到 npm,你可以这样使用它:
88

0 commit comments

Comments
 (0)