Skip to content

Commit

Permalink
refactor: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Feb 26, 2019
1 parent d49cb25 commit b358336
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/@vuepress/core/lib/theme-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = class ThemeAPI {

init () {
const alias = {
'@theme': this.theme.path,
'@current-theme': this.theme.path
}
if (this.existsParentTheme) {
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/docs/miscellaneous/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ That is, those titles defined by one or more `#` in `markdown`.

## themeConfig

- Access: `$site | Context.themeConfig`
- Access: `$themeConfig | Context.themeConfig`

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

## themePath

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

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

## parentThemeNetry
## parentThemeEntry

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

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/theme/inheritance.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ On this premise, when you create a `Navbar` component in the same place in the c

::: vue
theme
└── components
└── components
   └── `Navbar.vue`
:::

Expand Down
4 changes: 2 additions & 2 deletions packages/docs/docs/zh/miscellaneous/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sidebar: auto

## themeConfig

- Access: `$site | Context.themeConfig`
- Access: `$themeConfig | Context.themeConfig`

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

Expand All @@ -72,7 +72,7 @@ sidebar: auto

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

## parentThemeNetry
## parentThemeEntry

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

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/zh/theme/inheritance.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ import Home from '@theme/components/Navbar.vue'

::: vue
theme
└── components
└── components
   └── `Navbar.vue`
:::

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/zh/theme/using-a-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

## 使用来自依赖的插件
## 使用来自依赖的主题

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

Expand Down

0 comments on commit b358336

Please sign in to comment.