1.0.2 • Published 2 years ago
@pengzhanbo/vuepress-plugin-caniuse v1.0.2
vuepress-plugin-caniuse
支持在 vuepress2.x 文档中嵌入 can-I-use 的 feature support chart
Install
yarn add @pengzhanbo/vuepress-plugin-caniuse
Usage
在你的vuepress 配置文件中添加插件。 并进行插件配置
options
type: 渲染方式
- embed: 交互式嵌入。
- image: 仅插入一张图片
// vuepress config.js
export default {
// ...
plugin: [
// ...
['@pengzhanbo/vuepress-plugin-caniuse', { type: 'embed' }] // embed | image
]
// ...
}
markdown 书写格式:
::: caniuse [feature]
:::
feature的标准写法值,参考:https://caniuse.bitsofco.de/
In your markdown file:
::: caniuse css-matches-pseudo
:::
效果: