feat: 引入 @nolebase/vitepress-plugin-git-changelog 插件以实现基于 Git 的页面历史
	
		
			
	
		
	
	
		
	
		
			Some checks are pending
		
		
	
	
		
			
				
	
				Deploy GitHub Pages / build (push) Waiting to run
				
					
					
				
			
		
			
				
	
				Deploy GitHub Pages / Deploy (push) Blocked by required conditions
				
					
					
				
			
		
		
	
	
				
					
				
			
		
			Some checks are pending
		
		
	
	Deploy GitHub Pages / build (push) Waiting to run
				Deploy GitHub Pages / Deploy (push) Blocked by required conditions
				This commit is contained in:
		@@ -5,6 +5,11 @@ import DefaultTheme from 'vitepress/theme'
 | 
			
		||||
import './style.css'
 | 
			
		||||
import './custom.css'
 | 
			
		||||
import ArticleInfo from './components/ArticleInfo.vue'
 | 
			
		||||
import {
 | 
			
		||||
  NolebaseGitChangelogPlugin
 | 
			
		||||
} from '@nolebase/vitepress-plugin-git-changelog/client'
 | 
			
		||||
 | 
			
		||||
import '@nolebase/vitepress-plugin-git-changelog/client/style.css'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  extends: DefaultTheme,
 | 
			
		||||
@@ -16,5 +21,20 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  enhanceApp({ app, router, siteData }) {
 | 
			
		||||
    // ...
 | 
			
		||||
    app.use(NolebaseGitChangelogPlugin, {
 | 
			
		||||
      // see: https://nolebase-integrations.ayaka.io/pages/zh-CN/integrations/vitepress-plugin-git-changelog/configure-ui
 | 
			
		||||
      locales: {
 | 
			
		||||
        'zh-CN': {
 | 
			
		||||
          changelog: {
 | 
			
		||||
            title: '页面历史',
 | 
			
		||||
            noData: '暂无最近变更历史',
 | 
			
		||||
            lastEdited: '本页面最后编辑于 {{daysAgo}}',
 | 
			
		||||
            lastEditedDateFnsLocaleName: 'zhCN',
 | 
			
		||||
            viewFullHistory: '查看完整历史',
 | 
			
		||||
            committedOn: '于 {{date}} 提交',
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
} satisfies Theme
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user