2023-02-15 01:00:49 +08:00

31 lines
585 B
Markdown

# `@vuepress-plume/vuepress-plugin-blog-data`
## Install
```
yarn add @vuepress-plume/vuepress-plugin-blog-data
```
## Usage
``` js
// .vuepress/config.js
const { blogDataPlugin } = require('@vuepress-plume/vuepress-plugin-blog-data')
module.exports = {
//...
plugins: [
blogDataPlugin()
]
// ...
}
```
## Options
```ts
interface BlogDataPluginOptions {
include?: string | string[]
exclude?: string | string[]
sortBy?: 'createTime' | false | (<T>(prev: T, next: T) => boolean)
excerpt?: boolean
extendBlogData?: <T = any>(page: T) => Record<string, any>
}
```