Skip to content

Commit

Permalink
docs: optimized docs
Browse files Browse the repository at this point in the history
  • Loading branch information
QC2168 committed Dec 17, 2024
1 parent 2aedd32 commit 391d34b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,27 @@ export default defineConfig({
### 🛠️ Options

#### Parameters

| name | description | type | default |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------- |
| ignoreList | ignore specified folder | `string[]` | `true` |
| path | create scan path for the sidebar | `string` | `/docs` |
| ignoreIndexItem | ignore the page sidebar with only index.md | `boolean` | `false` |
| collapsed | By adding collapsed option to the sidebar group, it shows a toggle button to hide/show each section,For specific usage, please refer to VitePress | `boolean` | `false` |
| deletePrefix | deletes the md file prefix | `string` | |
| titleFromFile | read title from md file | `boolean` | `false` |
| titleFromFileByYaml | read title from yaml config | `boolean` | `false` |

### Hooks

You can change the injected sidebar object using the hooks parameter

| name | description | type | default |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------- |
| sideBarResolved | receive complete sidebar objects for custom modifications | `(data: DefaultTheme.SidebarMulti) => DefaultTheme.SidebarMulti` | |
| sideBarItemsResolved | receive complete sidebar subItem objects for custom modifications | `(data: DefaultTheme.SidebarItem[]) => DefaultTheme.SidebarItem[]` | |
| beforeCreateSideBarItems | obtain a list of file names scanned before generating sidebar subitems. If you want to sort sidebar data, it is recommended to use it | `(data: string[]) => string[]` | |
| titleFromFile | read title from md file | `boolean` | `false` |
| titleFromFileByYaml | read title from yaml config | `boolean` | `false` |

## License

Expand Down

0 comments on commit 391d34b

Please sign in to comment.