vssue / github-v4
This commit is contained in:
29
.vuepress/components/BaiduAutoPush.vue
Normal file
29
.vuepress/components/BaiduAutoPush.vue
Normal 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>
|
||||
@ -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'},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -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'],
|
||||
|
||||
@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user