From 747ff8d56502851785f65d6562d41d0e82f658d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=A9=D0=B0=D0=B2=D0=B5=D0=BB?= =?UTF-8?q?=D0=B5=D0=B2?= Date: Sat, 13 Jul 2024 22:28:07 +0300 Subject: [PATCH] .vitepress: add lexicon RU for plugin NolebaseGitChangelog --- .../plugins/NolebaseGitChangelog/index.ts | 28 +++++++++++++++++++ .vitepress/config/plugins/index.ts | 3 +- .vitepress/theme/index.ts | 15 ++++++---- 3 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 .vitepress/config/plugins/NolebaseGitChangelog/index.ts diff --git a/.vitepress/config/plugins/NolebaseGitChangelog/index.ts b/.vitepress/config/plugins/NolebaseGitChangelog/index.ts new file mode 100644 index 0000000..5eb06ac --- /dev/null +++ b/.vitepress/config/plugins/NolebaseGitChangelog/index.ts @@ -0,0 +1,28 @@ +export const NolebaseGitChangelogOptions = { + plugin: { + maxGitLogCount: 20000, + repoURL: 'https://github.com/OlegShchavelev/ALTKDEWiki' + }, + pluginSections: { + sections: { + disableChangelog: false, + disableContributors: false + } + }, + locales: { + 'ru-RU': { + changelog: { + title: 'История изменений', + noData: 'Нет изменений', + lastEdited: 'Последнее редактирование: {{daysAgo}}', + lastEditedDateFnsLocaleName: 'ru', + viewFullHistory: 'Показать историю', + committedOn: ' от {{date}}' + }, + contributors: { + title: 'Авторы', + noData: 'Нет информации' + } + } + }, +} \ No newline at end of file diff --git a/.vitepress/config/plugins/index.ts b/.vitepress/config/plugins/index.ts index fdcda9a..78389d6 100644 --- a/.vitepress/config/plugins/index.ts +++ b/.vitepress/config/plugins/index.ts @@ -1 +1,2 @@ -export { NolebaseEnhancedReadabilitiesOptions } from './NolebaseEnhancedReadabilities/index' \ No newline at end of file +export { NolebaseEnhancedReadabilitiesOptions } from './NolebaseEnhancedReadabilities/index' +export { NolebaseGitChangelogOptions } from './NolebaseGitChangelog/index' \ No newline at end of file diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index ce04a77..fe60022 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -7,9 +7,12 @@ import AMWDocsAsideMeta from './components/AMWDocsAsideMeta.vue' import AMWHomeSponsors from './components/AMWHomeSponsors.vue' import AMWVideo from './components/AMWVideo.vue' -import { NolebaseEnhancedReadabilitiesOptions } from '../config/plugins/index' +import { + NolebaseEnhancedReadabilitiesOptions, + NolebaseGitChangelogOptions +} from '../config/plugins/index' -import { +import { NolebaseEnhancedReadabilitiesMenu, NolebaseEnhancedReadabilitiesScreenMenu } from '@nolebase/vitepress-plugin-enhanced-readabilities/client' @@ -17,13 +20,13 @@ import type { Options } from '@nolebase/vitepress-plugin-enhanced-readabilities/ import { NolebaseEnhancedReadabilitiesPlugin } from '@nolebase/vitepress-plugin-enhanced-readabilities/client' import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css' -import { - NolebaseGitChangelogPlugin +import { + NolebaseGitChangelogPlugin } from '@nolebase/vitepress-plugin-git-changelog/client' import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client' -import './styles/style.css' +import './styles/style.css' import './styles/theme.css' import 'uno.css' import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css' @@ -42,7 +45,7 @@ export default { }, enhanceApp({ app }) { app.use(NolebaseEnhancedReadabilitiesPlugin, NolebaseEnhancedReadabilitiesOptions as Options) - app.use(NolebaseGitChangelogPlugin) + app.use(NolebaseGitChangelogPlugin, NolebaseGitChangelogOptions) app.component('contribution', AMWContribution) app.component('Video', AMWVideo) enhanceAppWithTabs(app)