配置“一键复制代码”
小于 1 分钟
插件简介
vuepress-theme-hope 内置了 vuepress-plugin-copy-code2,提供了一个复制按钮。
配置方法
直接在
theme.ts
文件中的plugins
中添加copyCode:{}
即可
export default hopeTheme({
locales: {
},
//插件
plugins: {
blog: true,
copyCode: {
duration: 800,
},
}
}