0.3.0 โข Published 3 years ago
@kidonng/vuepress-plugin-contributors v0.3.0
VuePress Contributors Plugin
This plugin provides a component for showing GitHub contributors. It uses GitHub File Contributors API under the hood.
Usage
- Install
@kidonng/vuepress-plugin-contributors
- Add the plugin to
.vuepress/config.js
module.exports = {
plugins: [
['@kidonng/vuepress-plugin-contributors', {
// Repository (default to `themeConfig.docsRepo || themeConfig.repo`)
docsRepo: 'vuejs/vuepress',
// Branch (defaults to `master`)
docsBranch: 'master',
// Document directory (defaults to `themeConfig.docsDir`)
docsDir: 'docs',
// Contributors label (defaults to `Contributors`)
label: 'Authors',
// API endpoint (defaults to https://api.xuann.wang/api/github-file-contributors)
api: 'https://example.com'
}]
],
// i18n
themeConfig: {
locales: {
'/': { contributorsLabel: 'Authors' },
'/zh/': { contributorsLabel: '่ดก็ฎ่
' }
}
}
}
- Add
<Contributors />
component to your page - Profit ๐
Customizing
You can customize the component via .contributors
class.