Skip to content

Commit e50d5a6

Browse files
authored
Fix warning of vuepress plugins have been used multiple times (#2075)
* Remove duplicate plugins that already included in default theme * Remove duplicate plugins that already included in default theme * ci
1 parent 897f2ca commit e50d5a6

File tree

3 files changed

+1300
-1697
lines changed

3 files changed

+1300
-1697
lines changed

.vuepress/config.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
import path from 'node:path';
22
import { defineUserConfig } from '@vuepress/cli';
3-
import { gitPlugin } from '@vuepress/plugin-git';
43
import { feedPlugin } from '@vuepress/plugin-feed';
54
import { viteBundler } from '@vuepress/bundler-vite';
65
import { shikiPlugin } from '@vuepress/plugin-shiki';
76
import { defaultTheme } from '@vuepress/theme-default';
87
import { sitemapPlugin } from '@vuepress/plugin-sitemap';
9-
import { copyCodePlugin } from '@vuepress/plugin-copy-code';
108
import { docsearchPlugin } from '@vuepress/plugin-docsearch';
11-
import { backToTopPlugin } from '@vuepress/plugin-back-to-top';
12-
import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom';
139

1410
import {
1511
navbarDe,
@@ -202,19 +198,19 @@ export default defineUserConfig({
202198
},
203199
themePlugins: {
204200
prismjs: false,
201+
// copyCode plugin configuration (already included in defaultTheme)
202+
copyCode: {
203+
locales: {
204+
'/': {
205+
copy: 'Copy Codes from code block',
206+
},
207+
},
208+
},
205209
},
206210
}),
207211
plugins: [
208-
gitPlugin(),
209-
backToTopPlugin(),
210-
mediumZoomPlugin(),
211-
copyCodePlugin({
212-
locales: {
213-
'/': {
214-
copy: 'Copy Codes from code block',
215-
},
216-
},
217-
}),
212+
// Note: gitPlugin, backToTopPlugin, mediumZoomPlugin, and copyCodePlugin
213+
// are already included in defaultTheme, so we don't need to add them here
218214
shikiPlugin({
219215
themes: {
220216
light: 'dark-plus',

0 commit comments

Comments
 (0)