贡献者插件

基于https://github.com/kidonng/vuepress-plugin-contributors做二次开发,感谢原作者

配置参数

.vuepress/config.js

  1. module.exports = {
  2. plugins: [
  3. [
  4. require('./plugins/vuepress-plugin-contributors/index'),
  5. {
  6. docsRepo: 'tencent-connect/bot-docs', //github仓库路径
  7. docsBranch: 'main', // 分支
  8. docsDir: 'docs', // 文档目录 默认`themeConfig.docsDir`
  9. label: '贡献者',
  10. // test: https://api.xuann.wang/api/github-file-contributors?user=tencent-connect&repo=bot-docs&tree=main&path=docs/README.md
  11. api: 'https://api.xuann.wang/api/github-file-contributors', // API接口 todo
  12. disableRoutes: ['/develop/api/'], //需要忽略的路径
  13. },
  14. ],
  15. ],
  16. // i18n
  17. themeConfig: {
  18. locales: {
  19. '/': { contributorsLabel: 'Contributors' },
  20. '/zh/': { contributorsLabel: '贡献者' },
  21. },
  22. },
  23. };