|
@@ -1,4 +1,5 @@
|
|
|
import { defineConfig } from 'vitepress'
|
|
|
+import { CustomAvatars } from './constant'
|
|
|
import { getChangelogAndContributors } from 'vitepress-plugin-changelog'
|
|
|
|
|
|
export default defineConfig({
|
|
@@ -102,9 +103,13 @@ export default defineConfig({
|
|
|
},
|
|
|
async transformPageData ({ relativePath }) {
|
|
|
const { contributors, changelog } = await getChangelogAndContributors(relativePath)
|
|
|
+ const CustomContributors = contributors.map(contributor => {
|
|
|
+ contributor.avatar = `https://jygit.jydev.jianyu360.cn/avatars/${CustomAvatars[contributor.name]}`
|
|
|
+ return contributor
|
|
|
+ })
|
|
|
return {
|
|
|
CommitData: {
|
|
|
- contributors,
|
|
|
+ contributors: CustomContributors,
|
|
|
changelog,
|
|
|
commitURL: 'https://jygit.jydev.jianyu360.cn/jianyu/web/commit/',
|
|
|
title: '更新记录'
|