docs(plugin-notes-data): add docs

This commit is contained in:
pengzhanbo 2023-02-15 01:02:10 +08:00
parent 4c10215333
commit e82186ce68

View File

@ -16,3 +16,32 @@ module.exports = {
// ...
}
```
## Options
``` ts
type NotesDataOptions = {
dir: string
link: string
include?: string | string[]
exclude?: string | string[]
notes: NotesItem[]
}
type NotesItem = {
dir: string
link: string
text: string
sidebar?: NotesSidebar | 'auto'
}
type NotesSidebar = (NotesSidebarItem | string)[]
type NotesSidebarItem = {
text?: string
link?: string
dir?: string
collapsed?: boolean
items?: NotesSidebar
}
```