docs(plugin-blog-data): add doc
This commit is contained in:
parent
de43164550
commit
4c10215333
30
packages/plugin-blog-data/README.md
Normal file
30
packages/plugin-blog-data/README.md
Normal 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>
|
||||
}
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user