外观
Plume主题自定义样式使用
段落首行缩进
- 在.vuepress/theme/styles目录下新建index.css文件,添加如下内容:
/* 先对所有段落应用基础样式 */
p {
text-indent: 2em;
margin: 0.5em 0;
}
/* 排除页面头部、导航等非正文区域 */
.navbar p,
.sidebar p,
.footer p,
.page-meta p,
.toc p,
.breadcrumb p,
.author-info p,
.tag-list p,
.reading-time ,
.create-time ,
.text ,
/* 排除特殊内容块 */
blockquote p,
.custom-block p,
.code-block p,
.alert p,
.tip p,
.warning p,
.danger p,
.example p {
text-indent: 0;
}- 在
./vuepress/client.ts文件中间添加import './theme/styles/index.css',然后重新构建即可。