|
@@ -1,6 +1,9 @@
|
|
import { defineConfig } from 'vitepress'
|
|
import { defineConfig } from 'vitepress'
|
|
|
|
+import { getChangelogAndContributors } from 'vitepress-plugin-changelog'
|
|
|
|
+
|
|
|
|
|
|
// https://vitepress.dev/reference/site-config
|
|
// https://vitepress.dev/reference/site-config
|
|
|
|
+// @ts-ignore
|
|
export default defineConfig({
|
|
export default defineConfig({
|
|
base: '/efe-docs/',
|
|
base: '/efe-docs/',
|
|
outDir: './efe-docs',
|
|
outDir: './efe-docs',
|
|
@@ -68,19 +71,30 @@ export default defineConfig({
|
|
provider: 'local'
|
|
provider: 'local'
|
|
},
|
|
},
|
|
lastUpdated: {
|
|
lastUpdated: {
|
|
- text: '上次更新:',
|
|
|
|
|
|
+ text: '上次更新',
|
|
formatOptions: {
|
|
formatOptions: {
|
|
dateStyle: 'full',
|
|
dateStyle: 'full',
|
|
timeStyle: 'medium'
|
|
timeStyle: 'medium'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
editLink: {
|
|
editLink: {
|
|
- pattern: 'https://jygit.jydev.jianyu360.cn/jianyu/web/src/main/docs/:path',
|
|
|
|
|
|
+ pattern: 'https://jygit.jydev.jianyu360.cn/jianyu/web/src/docs/docs/:path',
|
|
text: '编辑'
|
|
text: '编辑'
|
|
},
|
|
},
|
|
docFooter: {
|
|
docFooter: {
|
|
prev: '返回',
|
|
prev: '返回',
|
|
next: '继续阅读'
|
|
next: '继续阅读'
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ async transformPageData ({ relativePath }) {
|
|
|
|
+ const { contributors, changelog } = await getChangelogAndContributors(relativePath)
|
|
|
|
+ return {
|
|
|
|
+ CommitData: {
|
|
|
|
+ contributors,
|
|
|
|
+ changelog,
|
|
|
|
+ commitURL: 'https://jygit.jydev.jianyu360.cn/jianyu/web/commit/',
|
|
|
|
+ title: '更新记录'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|