你可以在 frontmatter 元数据中指定 pageType,以便在页面中使用不同的布局。默认情况下,文档的 pageType 是 doc,这样会默认出现左边的侧边栏和右侧的大纲栏。如果你不需要这些,可以将 pageType 设置为 custom:
---
pageType: custom
---在 rspress.config.ts 中,你可以配置侧边栏的内容,具体可参考 API-侧边栏配置。
通过 outlineTitle 配置项,你可以设置大纲栏的标题。
import { defineConfig } from '@rspress/core';
import path from 'path';
export default defineConfig({
themeConfig: {
outlineTitle: '目录',
},
});通过 prevText 和 nextText 配置项,你可以设置上一页/下一页的文本。
import { defineConfig } from '@rspress/core';
export default defineConfig({
themeConfig: {
prevPageText: '上一页',
nextPageText: '下一页',
},
});