vuepress-plugin-homebadge
A homepage badge plugin for AntDocs theme.
![NPM](https://camo.githubusercontent.com/6128bbf71b7be520f80653d17059c439cedfb8214edc11f2ffe33bd6c418d5c0/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f76756570726573732d706c7567696e2d686f6d6562616467653f7374796c653d666c61742d737175617265)
yarn add -D vuepress-plugin-homebadge
# OR npm install -D vuepress-plugin-homebadge
module.exports = {
plugins: ['homebadge']
}
module.exports = {
plugins: [
['homebadge',{
selector: '.hero',
repoLink: 'https://github.com/zpfz/vuepress-theme-antdocs',
badgeLink: 'https://img.shields.io/github/stars/zpfz/vuepress-theme-antdocs?style=social',
badgeGroup: [
'https://img.shields.io/badge/build-passing-brightgreen?style=flat-square',
'https://img.shields.io/npm/dt/vuepress-theme-antdocs?style=flat-square&color=red',
'https://img.shields.io/github/license/zpfz/vuepress-theme-antdocs?style=flat-square&color=blue',
'https://img.shields.io/npm/v/vuepress-theme-antdocs?style=flat-square'
]
}]
]
}
- 类型:
string
- 默认值:
.hero
指定要注入徽标的父节点,该操作会在父节点内的最后一个元素追加徽标链接。
- 类型:
string
- 默认值:
undefined
指定一个 Github 库链接,当用户点击 Star 徽标时,会跳转至该链接。
- 类型:
string
- 默认值:
undefined
指定 Star 徽标链接,链接可从 shields.io 获取。
- 类型:
array
- 默认值:
undefined
指定 Star 徽标链接,链接可从 shields.io 获取。