docs: install with pnpm (#9850)

This commit is contained in:
neverland
2021-11-12 17:49:53 +08:00
committed by GitHub
parent c65e336bf6
commit b163d87064
18 changed files with 131 additions and 85 deletions
+12 -13
View File
@@ -4,27 +4,26 @@ Simple and fast vue markdown loader, transform markdown to vue component.
## Install
### NPM
```shell
npm i @vant/markdown-loader -S
```
# with npm
npm i @vant/markdown-loader -D
### YARN
# with yarn
yarn add @vant/markdown-loader -D
```shell
yarn add @vant/markdown-loader
# with pnpm
pnpm add @vant/markdown-loader -D
```
## Options
- `enableMetaData`: Default `false`. Whether to use [front-matter](https://github.com/jxson/front-matter) to extract markdown meta data
- `linkOpen`: Default `true`. Whether to add target="_blank" to all links
- `linkOpen`: Default `true`. Whether to add target="\_blank" to all links
- `wrapper(html, fm)`: Format the returned content using a custom function
- `html`: The result of [markdown-it](https://github.com/markdown-it/markdown-it)'s render
- `fm`: See [fm(string)](https://github.com/jxson/front-matter#fmstring). If `enableMetaData` option is `false`, the value is `undefined`.
- `attributes`
- `body`
- `frontmatter`
- `html`: The result of [markdown-it](https://github.com/markdown-it/markdown-it)'s render
- `fm`: See [fm(string)](https://github.com/jxson/front-matter#fmstring). If `enableMetaData` option is `false`, the value is `undefined`.
- `attributes`
- `body`
- `frontmatter`