vssue / github-v4

This commit is contained in:
huanqing.shao
2019-12-10 23:16:46 +08:00
parent 01db392e09
commit 4541fb3544
6 changed files with 39 additions and 57 deletions

View File

@ -0,0 +1,29 @@
<template>
<div>
</div>
</template>
<script>
export default {
mounted () {
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(bp, s);
})();
}
}
</script>
<style>
</style>

View File

@ -33,8 +33,7 @@ export default {
return {
urls: [
{name: 'sealos官网', url: 'http://store.lameleg.com?referrer=shaohq', icon: 'https://hugo-picture.oss-cn-beijing.aliyuncs.com/blog/2019-08-27-044824.jpg'},
{name: '云原生实验室', url: 'https://www.yangcs.net/', icon: 'https://hugo-picture.oss-cn-beijing.aliyuncs.com/favicon-32x32.png'},
{name: '阳明的博客', url: 'https://www.qikqiak.com/', icon: 'https://bxdc-static.oss-cn-beijing.aliyuncs.com/images/favicon.png'},
{name: '云原生实验室', url: 'https://fuckcloudnative.io/', icon: 'https://hugo-picture.oss-cn-beijing.aliyuncs.com/favicon-32x32.png'},
]
}
}

View File

@ -2,6 +2,7 @@
<div>
<LazyLoad>
<div v-for="(item, key) in vssues" :key="key">
<BaiduAutoPush></BaiduAutoPush>
<Vssue v-if="item && item > 0" v-show="key === $route.path" :issueId="item" :options="options"/>
<div v-if="item === undefined && isLocalHost" v-show="key === $route.path" :key="key">
<b-button variant="danger" @click="vssues[key] = ''">请创建 VssueId</b-button>
@ -11,7 +12,7 @@
<Vssue ref="vssue" :title="$page.path" :options="options"/>
</div>
</div>
<script type="text/javascript">
<!-- <script type="text/javascript">
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
@ -24,7 +25,7 @@
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
</script> -->
</LazyLoad>
</div>
</template>
@ -49,7 +50,7 @@ export default {
options () {
let _this = this
let result = {
platform: 'github',
platform: 'github-v4',
locale: 'zh-CN',
autoCreateIssue: true,
admins: ['shaohq'],

View File

@ -97,7 +97,7 @@ module.exports = {
// },
'@vssue/vuepress-plugin-vssue': {
// set `platform` rather than `api`
platform: 'github',
platform: 'github-v4',
locale: 'zh-CN',
autoCreateIssue: false,
admins: ['shaohq'],

52
package-lock.json generated
View File

@ -879,56 +879,10 @@
"resolved": "https://registry.npm.taobao.org/@types/q/download/@types/q-1.5.2.tgz",
"integrity": "sha1-aQoUdbhPKohP0HzXl8APXzE1bqg="
},
"@vssue/api-github-v3": {
"version": "1.1.2",
"resolved": "https://registry.npm.taobao.org/@vssue/api-github-v3/download/@vssue/api-github-v3-1.1.2.tgz",
"integrity": "sha1-JEZ6b2LqrikJHphhYLWKqFnYd/Q=",
"dev": true,
"requires": {
"@vssue/utils": "^1.1.1",
"axios": "^0.18.1"
},
"dependencies": {
"axios": {
"version": "0.18.1",
"resolved": "https://registry.npm.taobao.org/axios/download/axios-0.18.1.tgz",
"integrity": "sha1-/z8N4ue10YDnV62YAA8Qgbh7zqM=",
"dev": true,
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
}
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz",
"integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz",
"integrity": "sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=",
"dev": true,
"requires": {
"debug": "=3.1.0"
}
},
"is-buffer": {
"version": "2.0.4",
"resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-2.0.4.tgz?cache=0&sync_timestamp=1569905349018&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-buffer%2Fdownload%2Fis-buffer-2.0.4.tgz",
"integrity": "sha1-PlcvI8hBGlz9lVfISeNmXgspBiM=",
"dev": true
}
}
},
"@vssue/api-github-v4": {
"version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/@vssue/api-github-v4/download/@vssue/api-github-v4-1.2.0.tgz",
"integrity": "sha1-95/4wbBq75KZpQeNMwNBmrLMvMA=",
"version": "1.2.1",
"resolved": "https://registry.npm.taobao.org/@vssue/api-github-v4/download/@vssue/api-github-v4-1.2.1.tgz",
"integrity": "sha1-ANuhrK9yfw3lu1n06meQJ5ck+j4=",
"dev": true,
"requires": {
"@vssue/utils": "^1.1.1",

View File

@ -4,8 +4,7 @@
"docs:build": "vuepress build ."
},
"devDependencies": {
"@vssue/api-github-v3": "^1.1.2",
"@vssue/api-github-v4": "^1.2.0",
"@vssue/api-github-v4": "^1.2.1",
"@vssue/vuepress-plugin-vssue": "^1.2.0",
"@vuepress/plugin-active-header-links": "^1.0.0-rc.1",
"@vuepress/plugin-back-to-top": "^1.2.0",