vuepress-----10、vssue使用

vssue使用

https://vssue.js.org/

image-20231205134741213

image-20231205134830769

image-20231205134852123

按照文档 https://vssue.js.org/zh/guide/github.html (opens new window) 操作

# 1、创建 OAuth application

https://github.com/settings/applications/new (opens new window)

image-20231205135403723

# 2、安装插件

image-20231205135616537

yarn add @vssue/vuepress-plugin-vssue

# 这里安装的是v4后面配置时需要注意
yarn add @vssue/api-github-v4

# 3、插件使用

'@vssue/vuepress-plugin-vssue': {
    // 设置 `platform` 而不是 `api`
    platform: 'github-v4',//这里需要加-v4来使用v4版本的api

    // 其他的 Vssue 配置
    //GitHub账号名称
    owner: 'zs-mcu',
    //仓库名称
    repo: 'docs',
    //Oauth信息
    clientId: '09b48aa193526adeb1a8',
    clientSecret: 'e3bfa36d814f2a4cc89ebefbb42858d714b4091e',
  },

不然会出现下面提示

image-20231205143246003

正确的配置的启动效果是这样

image-20231205143411343

image-20231205135959741

填入配置项中

image-20231205140802058

image-20231205141142926

# 4、测试验证

image-20231205143508511

image-20231205144109917

image-20231205144051449

# 优化1、自动创建issues

image-20231205144428757

image-20231205145455153

设置中文显示

image-20231205145508510

# 优化2、全局引入

需要修改默认主体

创建js文件继承原有主题

image-20231205151507287

文件覆盖约定

image-20231205145644633

从官网复制出文件,以及文件所需的工具类

image-20231205151735766

修改测试

image-20231205150844705

image-20231205150822770

将vssue组件添加到页面底部的插槽中

image-20231205151907774

修改为正式环境地址,发布测试

image-20231205152219466

  • 8
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

悠闲的线程池

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值