Skip to content

Commit 1c8f909

Browse files
committed
docs: warn of styling config restriction
1 parent 4bdca1c commit 1c8f909

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/docs/docs/config/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ VuePress provides a convenient way to add extra styles. You can create a `.vuepr
187187

188188
- [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)
189189

190+
::: warning
191+
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.
192+
:::
193+
190194
## Theming
191195

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

323327
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.
324-
328+
325329
``` js
326330
module.exports = {
327331
markdown: {

packages/docs/docs/zh/config/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ VuePress 提供了一种添加额外样式的简便方法。你可以创建一
179179
}
180180
```
181181

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

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

315319
Markdown 文件的 headers (标题 & 小标题) 会在准备阶段被提取出来,并存储在 `this.$page.headers` 中。默认情况下,VuePress 会提取 `h2``h3` 标题。你可以通过这个选项来修改提取出的标题级别。
316-
320+
317321
``` js
318322
module.exports = {
319323
markdown: {

0 commit comments

Comments
 (0)