Skip to content

Commit

Permalink
docs: warn of styling config restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
billyyyyy3320 committed Feb 2, 2020
1 parent 4bdca1c commit 1c8f909
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/docs/docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ VuePress provides a convenient way to add extra styles. You can create a `.vuepr

- [Why can’t `palette.styl` and `index.styl` merge into one API?](../faq/README.md#why-can-t-palette-styl-and-index-styl-merge-into-one-api)

::: warning
In both `palette.styl` and `index.styl`, the normal `.css` style sheets are not allowed to be imported by `@import` / `@require`. However, you’re still able to import styles from other Stylus style sheets.
:::

## Theming

### theme
Expand Down Expand Up @@ -321,7 +325,7 @@ This option is also included in [Plugin API](../plugin/option-api.md#extendmarkd
- Default: `['h2', 'h3']`

While preparing the page, headers are extracted from the Markdown file and stored in `this.$page.headers`. By default, VuePress will extract `h2` and `h3` elements for you. You can override the headers it pulls out in your `markdown` options.

``` js
module.exports = {
markdown: {
Expand Down
6 changes: 5 additions & 1 deletion packages/docs/docs/zh/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ VuePress 提供了一种添加额外样式的简便方法。你可以创建一
}
```

::: warning
不论是在 `palette.styl` 或是 `index.styl` ,正常的 `.css` 样式表都不能被透过 `@import` / `@require` 引用。不过你仍然可以透过其他 Stylus 样式表引入样式。
:::

## 主题

### theme
Expand Down Expand Up @@ -313,7 +317,7 @@ module.exports = {
- 默认值: `['h2', 'h3']`

Markdown 文件的 headers (标题 & 小标题) 会在准备阶段被提取出来,并存储在 `this.$page.headers` 中。默认情况下,VuePress 会提取 `h2``h3` 标题。你可以通过这个选项来修改提取出的标题级别。

``` js
module.exports = {
markdown: {
Expand Down

0 comments on commit 1c8f909

Please sign in to comment.