@modern-js/doc-tools-doc
Version:
Website for @modern-js/doc-tools
52 lines (38 loc) • 1.26 kB
text/mdx
# Doc Page
## Page Type
You can specify the pageType in the `frontmatter` metadata to use different layouts in the page. By default, the pageType of the document is `doc`, so the `sidebar` on the left and the `outline ` on the right will appear by default. If you don't need these, you can set pageType to `custom`:
```yaml
pageType: custom
```
## Sidebar
In `modern.config.ts`, you can configure the content of the sidebar, for details, please refer to [Sidebar Config](/api/config/config-theme#sidebar).
## Outline Title
With the `outlineTitle` config, you can set the title of the outline bar.
```ts title="modern.config.ts"
import { docTools, defineConfig } from '@modern-js/doc-tools';
import path from 'path';
export default defineConfig({
doc: {
themeConfig: {
outlineTitle: 'ON THIS PAGE',
},
},
plugins: [docTools()],
});
```
## Previous/Next Page Text
With the `prevPageText` and `nextPageText` config, you can set the previous/next page text.
```ts title="modern.config.ts"
import { docTools, defineConfig } from '@modern-js/doc-tools';
export default defineConfig({
doc: {
themeConfig: {
prevPageText: 'Prev Page',
nextPageText: 'Next Page',
},
},
plugins: [docTools()],
});
```