2024-07-08 02:44:55 +08:00
..
2024-07-08 02:44:55 +08:00
2024-07-08 02:44:55 +08:00
2024-03-22 01:09:57 +08:00

@vuepress-plume/plugin-notes-data

Install

npm install @vuepress-plume/plugin-notes-data
# or
pnpm add @vuepress-plume/plugin-notes-data
# or
yarn add @vuepress-plume/plugin-notes-data

Usage

// .vuepress/config.[jt]s
import { notesDataPlugin } from '@vuepress-plume/plugin-notes-data'

export default {
  // ...
  plugins: [
    notesDataPlugin()
  ]
  // ...
}

Options

interface NotesDataOptions {
  dir: string
  link: string
  include?: string | string[]
  exclude?: string | string[]
  notes: NotesItem[]
}

interface NotesItem {
  dir: string
  link: string
  text: string
  sidebar?: NotesSidebar | 'auto'
}

type NotesSidebar = (NotesSidebarItem | string)[]

interface NotesSidebarItem {
  text?: string
  link?: string
  dir?: string
  collapsed?: boolean
  items?: NotesSidebar
}