提交 cacb3a1c 编写于 作者: D DCloud_LXH

feat: copy code

上级 2355a555
......@@ -3,6 +3,7 @@ const translatePlugin = require('./markdown/translate')
const headerPlugin = require('./markdown/header')
const createSidebar = require('./markdown/createSidebar')
const { simplifySlugText, tabs } = require('./utils')
const copyOptions = require('./config/copy');
const config = {
theme: 'vuepress-theme-uni-app-test',
......@@ -69,7 +70,10 @@ const config = {
.plugin('normallize-link')
.use(require('./markdown/normallizeLink'))
}
}
},
plugins: [
["vuepress-plugin-juejin-style-copy", copyOptions]
]
}
module.exports = config
\ No newline at end of file
// 此处需要使用 commonjs
module.exports = {
copyText: '复制代码',
tip: { content: "复制成功", title: "" },
visibleTip: true,
}
\ No newline at end of file
export default {
onThisPage: '文档结构',
collapseText: '全部',
onThisPage: '本文内容',
collapseText: '全部',
expandText: '收起目录'
}
\ No newline at end of file
......@@ -31,6 +31,6 @@
},
"dependencies": {
"@docsearch/js": "^3.1.0",
"vuepress-theme-uni-app-test": "^1.0.12"
"vuepress-theme-uni-app-test": "^1.1.0"
}
}
\ No newline at end of file
......@@ -2761,7 +2761,7 @@ clipboard@^2.0.10:
select "^1.1.2"
tiny-emitter "^2.0.0"
clipboard@^2.0.11:
clipboard@^2.0.11, clipboard@^2.0.4:
version "2.0.11"
resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.11.tgz#62180360b97dd668b6b3a84ec226975762a70be5"
integrity sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==
......@@ -8450,6 +8450,13 @@ vuepress-plugin-container@^2.0.2:
"@vuepress/shared-utils" "^1.2.0"
markdown-it-container "^2.0.0"
vuepress-plugin-juejin-style-copy@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/vuepress-plugin-juejin-style-copy/-/vuepress-plugin-juejin-style-copy-1.0.4.tgz#b58d10bdae9673875a33660f8a406f31161284bf"
integrity sha512-lnVajZ35B6mye1RpoLA+NeMmLv4sT4vwsiw3x9h2ENo10+EMvsZGYmM2dDoOJWR7UcJmlJhDZoGMMl0fpzceSQ==
dependencies:
clipboard "^2.0.4"
vuepress-plugin-smooth-scroll@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/vuepress-plugin-smooth-scroll/-/vuepress-plugin-smooth-scroll-0.0.3.tgz#6eff2d4c186cca917cc9f7df2b0af7de7c8c6438"
......@@ -8493,6 +8500,19 @@ vuepress-theme-uni-app-test@^1.0.12:
vuepress "^1.8.2"
vuepress-theme-uni-app-test "^1.0.11"
vuepress-theme-uni-app-test@^1.0.13:
version "1.0.13"
resolved "https://registry.yarnpkg.com/vuepress-theme-uni-app-test/-/vuepress-theme-uni-app-test-1.0.13.tgz#379daf33dcfd6fb7c75166654908e888c626f6cb"
integrity sha512-KfrH7evh9tfnoibm7wxcIR9QOPO2Sye5/FFjmaG7bYEjPIigW8kftWqWFFRGqazMu9FkxX1LkezNCh+iQQJVbw==
dependencies:
"@vuepress/plugin-back-to-top" "^1.9.5"
"@vuepress/theme-default" "^1.8.2"
algoliasearch "^4.13.1"
clipboard "^2.0.11"
vuepress "^1.8.2"
vuepress-plugin-juejin-style-copy "^1.0.4"
vuepress-theme-uni-app-test "^1.0.12"
vuepress-theme-uni-app-test@^1.0.6, vuepress-theme-uni-app-test@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/vuepress-theme-uni-app-test/-/vuepress-theme-uni-app-test-1.0.7.tgz#52654debd4a56fb86882f5b92372bbe38d2a0a6d"
......@@ -8529,6 +8549,19 @@ vuepress-theme-uni-app-test@^1.0.9:
vuepress "^1.8.2"
vuepress-theme-uni-app-test "^1.0.8"
vuepress-theme-uni-app-test@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/vuepress-theme-uni-app-test/-/vuepress-theme-uni-app-test-1.1.0.tgz#49dc6b01c956ef42dcc71123ad453eab467ac734"
integrity sha512-Mcf1Db1KOqr7Dgg5lXv2l9tjYBvO1FRaxBSXUuSsrgMAyv8hULgM96RljvpNf1wEjyGVx25XfFIU8X9mmVP7Qg==
dependencies:
"@vuepress/plugin-back-to-top" "^1.9.5"
"@vuepress/theme-default" "^1.8.2"
algoliasearch "^4.13.1"
clipboard "^2.0.11"
vuepress "^1.8.2"
vuepress-plugin-juejin-style-copy "^1.0.4"
vuepress-theme-uni-app-test "^1.0.13"
vuepress@^1.8.2:
version "1.9.7"
resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.9.7.tgz#2cd6709a2228f5cef588115aaeabf820ab9ed7cc"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册