Skip to content

Commit e79c8b7

Browse files
author
Lisianthus-A
authored
docs($zh): update custom page class for default theme config (#2719)
1 parent f23028e commit e79c8b7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: packages/docs/docs/zh/theme/default-theme-config.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -508,16 +508,20 @@ pageClass: custom-page-class
508508
---
509509
```
510510

511-
然后你就可以写专门针对该页面的 CSS
511+
只能在 `.vuepress/styles/index.styl` 中编写针对该页面的 CSS :
512512

513513
``` css
514-
/* .vuepress/override.styl */
514+
/* .vuepress/styles/index.styl */
515515

516516
.theme-container.custom-page-class {
517517
/* 特定页面的 CSS */
518518
}
519519
```
520520

521+
::: tip 注意
522+
自定义样式应该写在 [index.styl](/config/#index-styl) 内, 该文件可以让你方便地添加或覆盖样式.
523+
:::
524+
521525
## 特定页面的自定义布局
522526

523527
默认情况下,每个 `*.md` 文件将会被渲染在一个 `<div class="page">` 容器中,同时还有侧边栏、自动生成的编辑链接,以及上 / 下一篇文章的链接。如果你想要使用一个完全自定义的组件来代替当前的页面(而只保留导航栏),你可以再次使用 `YAML front matter` 来指定这个组件。

0 commit comments

Comments
 (0)