docs(plugin-blog-data): add doc

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

View File

@ -0,0 +1,30 @@
# `@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>
}
```