diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 2457e12dc1..54b5c82010 100755 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -8,6 +8,7 @@ const { description } = require('../package') import { backToTopPlugin } from '@vuepress/plugin-back-to-top' import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom' import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' +import codeCopyPlugin from '@snippetors/vuepress-plugin-code-copy'; /** * Ref:https://v2.vuepress.vuejs.org/guide/configuration.html#config-file @@ -275,5 +276,6 @@ export default defineUserConfig({ googleAnalyticsPlugin({ id: process.env.GOOGLE_ANALYTICS_ID }), + codeCopyPlugin(), ] }) diff --git a/docs/package.json b/docs/package.json index 90ebf9aad6..980e7593e5 100644 --- a/docs/package.json +++ b/docs/package.json @@ -18,6 +18,7 @@ }, "license": "MIT", "devDependencies": { + "@snippetors/vuepress-plugin-code-copy": "^1.2.3", "@vuepress/plugin-google-analytics": "^2.0.0-beta.63", "dotenv": "^16.3.1", "vuepress-vite": "^2.0.0-beta.63" diff --git a/docs/yarn.lock b/docs/yarn.lock index 3f5402cd40..aab50ed22d 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -214,6 +214,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@snippetors/vuepress-plugin-code-copy@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@snippetors/vuepress-plugin-code-copy/-/vuepress-plugin-code-copy-1.2.3.tgz#4cc5f7ef7530ff6654786f6baa2e15ca4ffb8b14" + integrity sha512-PiUbhlYseY4UqsE/ike/Up27GkrbHvR7OJqV5nlmHEW141uWcrVaBZsBS870ckqNF+vd2fk8g4TyoiHvxaUzSg== + "@types/debug@^4.1.8": version "4.1.8" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.8.tgz#cef723a5d0a90990313faec2d1e22aee5eecb317"