Skip to content

Commit

Permalink
vssue
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohq committed Sep 22, 2019
1 parent b0dc40c commit 1b69a42
Show file tree
Hide file tree
Showing 86 changed files with 371 additions and 47 deletions.
39 changes: 21 additions & 18 deletions .vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ module.exports = {
return dateFns.format(timestamp, 'YYYY-MM-DD HH:mm:ss')
}
},
'@vssue/vuepress-plugin-vssue': {
// set `platform` rather than `api`
platform: 'github',
locale: 'zh-CN',
autoCreateIssue: true,
admins: ['shaohq'],
// all other options of Vssue are allowed
owner: 'eip-work',
repo: 'kuboard-press',
// clientId: 'f96af83d4bff4e2b9e3e',
// clientSecret: 'cf5686d68d4aab6d3bfa256da9a714049b239c1f',
},
// 'vuepress-plugin-zooming': {
// // 支持点击缩放的图片元素的选择器
// // 默认值: '.theme-default-content img'
Expand All @@ -55,7 +67,8 @@ module.exports = {
'vuepress-plugin-element-tabs': {},
// 'vuepress-plugin-baidu-autopush':{},
'sitemap': {
hostname: 'https://kuboard.cn'
hostname: 'https://kuboard.cn',
outFile: '3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRl.xml'
},
'seo': {
siteTitle: (_, $site) => $site.title,
Expand Down Expand Up @@ -317,13 +330,13 @@ module.exports = {
// 'spring-cloud/cloud-eureka'
]
},
// {
// title: 'Open Capacity Platform',
// collapsable: false,
// children: [
// 'k8s-practice/ocp/',
// ]
// },
{
title: 'Open Capacity Platform',
collapsable: false,
children: [
'k8s-practice/ocp/',
]
},
]
}
],
Expand Down Expand Up @@ -402,16 +415,6 @@ module.exports = {
}
],

'/devops/': [
{
title: 'Devops',
collapsable: false,
children: [
''
]
}
],

}
}
}
14 changes: 9 additions & 5 deletions .vuepress/theme/components/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
<slot name="top"/>

<Content class="theme-default-content"/>
<div style="text-align: center; margin-bottom: 10px;">
<div style="text-align: center; margin-bottom: 10px;" v-if="$page.path.indexOf('/learning/') === 0">
<a href="https://github.com/eip-work/kuboard-press" target="_blank">如果您觉得 Kubernetes教程 有帮到您,点击此处,给个 Github Star,谢谢!</a>
</div>
<div style="text-align: center; margin-bottom: 10px;" v-else>
<a href="https://github.com/eip-work/kuboard-press" target="_blank">如果您觉得这篇文档有帮到您,点击此处,给个 Github Star,谢谢!</a>
</div>
<!-- <Valine></Valine> -->
<footer class="page-edit">
<footer class="page-edit" style="max-width: 1000px;">
<div
class="edit-link"
v-if="editLink"
Expand All @@ -29,7 +32,7 @@
</div>
</footer>

<div class="page-nav" v-if="prev || next">
<div class="page-nav" style="max-width: 1000px;" v-if="prev || next">
<p class="inner">
<span
v-if="prev"
Expand Down Expand Up @@ -59,17 +62,18 @@
</span>
</p>
</div>

<PageVssue class="theme-default-content" style="max-width: 1000px; margin-top: -1.6rem; padding-top: 0;"></PageVssue>
<slot name="bottom"/>
</main>
</template>

<script>
import { resolvePage, outboundRE, endingSlashRE } from '../util'
import PageVssue from './PageVssue'
export default {
props: ['sidebarItems'],
components: { PageVssue },
computed: {
lastUpdated () {
return this.$page.lastUpdated
Expand Down
61 changes: 61 additions & 0 deletions .vuepress/theme/components/PageVssue.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<template>
<div>
<div v-for="(item, key) in vssues" :key="key">
<Vssue v-if="item" v-show="key === $route.path" :issueId="item" :options="options"/>
<div v-if="item === undefined && isLocalHost" v-show="key === $route.path" :key="key">
<div style="color: red; background-color: yellow;">请创建 VssueId</div>
<Vssue :title="$page.path" :options="options"/>
</div>
</div>
</div>
</template>

<script>
export default {
data() {
return {
vssues: {}
}
},
computed: {
isLocalHost() {
if (window) {
if (window.location.host === 'localhost:8080') {
return true
}
}
return false
},
options () {
let _this = this
let result = {
platform: 'github',
locale: 'zh-CN',
autoCreateIssue: true,
admins: ['shaohq'],
// all other options of Vssue are allowed
owner: 'eip-work',
repo: 'kuboard-press',
clientId: this.isLocalHost ? 'f96af83d4bff4e2b9e3e' : '8141f5c205ad2f6d90d5',
clientSecret: this.isLocalHost ? 'cf5686d68d4aab6d3bfa256da9a714049b239c1f' : 'b3e238508a2e8da9f2b355662b4cb3e62ecaa1d4',
issueContent: (options, url) => { return 'https://kuboard.cn' + _this.$route.path }
}
return result
},
},
mounted () {
this.$set(this.vssues, this.$route.path, this.$frontmatter.vssueId)
},
watch: {
'$route.path': function () {
this.$set(this.vssues, this.$route.path, this.$frontmatter.vssueId)
}
},
}
</script>

<style>
.vssue-header-powered-by {
display: none;
}
</style>
2 changes: 1 addition & 1 deletion .vuepress/theme/layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
Expand Down
2 changes: 1 addition & 1 deletion .vuepress/theme/layouts/LearningLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
Expand Down
13 changes: 0 additions & 13 deletions devops/README.md

This file was deleted.

1 change: 1 addition & 0 deletions guide/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 70
description: 熟悉Kuboard_on_Kubernetes_的最佳途径。
---

Expand Down
1 change: 1 addition & 0 deletions guide/cluster/computing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 74
description: 使用Kuboard管理Kubernetes计算节点
---

Expand Down
1 change: 1 addition & 0 deletions guide/cluster/storage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 75
description: 使用Kuboard管理Kubernetes存储类StorageClass
---

Expand Down
1 change: 1 addition & 0 deletions guide/example/busybox.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 73
description: 使用Kuboard向Kubernetes部署一个最简单的Deployment
---

Expand Down
1 change: 1 addition & 0 deletions guide/example/import.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 76
description: 通过Kuboard将一个预先定义好的SpringCloud微服务样例程序导入到Kubernetes中。
---

Expand Down
1 change: 1 addition & 0 deletions guide/example/monitor.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 77
description: 使用Kuboard在Kubernetes上安装监控套件,并对example微服务实现资源层监控、中间件层监控、链路追踪和APM监控
---

Expand Down
1 change: 1 addition & 0 deletions install/install-dashboard-upgrade.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 19
description: Kubernete安装文档_详细介绍如何将Kuboard升级到最新版本。
---

Expand Down
1 change: 1 addition & 0 deletions install/install-dashboard.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 13
description: Kubernete安装文档_Kuboard的安装手册_包括安装Kuboard的前提条件_与Kubernetes的版本兼容性_安装步骤_以及完成安装后如何访问Kuboard界面。
# storyBook:
# title: '安装 Kuboard'
Expand Down
1 change: 1 addition & 0 deletions install/install-docker-desktop.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 14
description: Kubernete安装文档_本文介绍了如何在Windows_Mac电脑安装Kubernetes测试集群
---

Expand Down
1 change: 1 addition & 0 deletions install/install-k8s-upgrade.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 17
description: Kubernete安装文档_使用kubeadm升级kubernetes集群
---

Expand Down
1 change: 1 addition & 0 deletions install/install-k8s.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 15
# layout: StepLayout
description: Kubernete安装文档_Kubernetes最新稳定版v1.16.0的快速安装文档_该文档由众多网友验证并在线提出修改意见_持续不断地更新和完善_并且通过QQ群提供免费在线答疑的服务
# storyBook:
Expand Down
1 change: 1 addition & 0 deletions install/install-kubectl.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 18
description: Kubernete安装文档_日常工作中您可能需要在自己的笔记本电脑上执行kubectl命令以管理远程Linux服务器上的Kubernetes集群_本文档介绍了如何在您的笔记本电脑上安装和配置kubectl工具
---

Expand Down
1 change: 1 addition & 0 deletions install/install-kubernetes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 16
description: Kubernete安装文档_使用kubeadm安装高可用的Kubernetes_v1.15.3集群
# storyBook:
# title: '使用 kubeadm 安装 kubernetes v1.15.3(高可用)'
Expand Down
1 change: 1 addition & 0 deletions learning/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 9
layout: LearningLayout
description: Kubernetes免费中文教程目录
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-advanced/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 66
layout: LearningLayout
description: Kubernetes教程_高级篇_主要涉及日志采集_安全_监控_联邦等内容
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-basics/deploy-app.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 21
layout: LearningLayout
description: Kubernetes教程_本文详细讲解了Kubernetes_Deployment的概念_并描述了如何使用kubectl_Kuboard创建一个Deployment
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-basics/explore.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 22
layout: LearningLayout
description: Kubernetes教程_本文介绍了如何使用kubectl_Kuboard查看和浏览Kubernetes上的节点_容器组_部署等信息_并依据这些信息作出问题诊断
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-basics/expose.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 23
layout: LearningLayout
description: Kubernetes教程_本文详细讲解了Kubernetes_Service的概念_并描述了如何使用kubectl_Kuboard创建一个Service_以使得部署在Kubernetes上的容器可以被访问
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-basics/k8s-core-concepts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 26
layout: LearningLayout
description: Kubernetes教程_以gif动图的形式形象的描述Kubernetes核心概念_本文将会简单介绍Kubernetes的核心概念_因为这些定义可以在Kubernetes的文档中找到_所以文章也会避免用大段的枯燥的文字介绍_相反_我们会使用一些图表(其中一些是动画)和示例来解释这些概念_我们发现一些概念(比如Service)如果没有图表的辅助就很难全面地理解_在合适的地方我们也会提供Kubernetes文档的链接以便读者深入学习
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-basics/kubernetes-basics.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 27
layout: LearningLayout
description: Kubernetes教程_本文为初学者介绍了一套最合适的Kubernetes入门教程_该教程源自于Kubernetes官方网站_作者对其进行了翻译_并根据初学者的理解情况做了适当的改写
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-basics/scale.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 24
layout: LearningLayout
description: Kubernetes教程_本文详细讲解了Kubernetes_Scale的概念_并描述了如何使用_kubectl_Kuboard_对一个应用程序进行伸缩操作
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-basics/update.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 25
layout: LearningLayout
description: Kubernetes教程_本文详细讲解了Kubernetes_Rolling_Update_的概念_并描述了如何使用_kubectl_Kuboard_对一个应用程序执行滚动更新。
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-intermediate/config/assign-pod-node.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 64
layout: LearningLayout
description: Kubernetes教程_在Kubernetes中将Pod容器组调度到指定的节点
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-intermediate/config/computing-resource.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 63
layout: LearningLayout
description: Kubernetes教程_在Kubernetes中管理和分配容器的计算资源
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-intermediate/config/config-map.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 62
layout: LearningLayout
description: Kubernetes教程_Kubernetes_ConfigMap可以将配置信息和容器镜像解耦_以使得容器化的应用程序可移植_本文提供了一系列的实例_解释如何通过Kuboard创建ConfigMap以及如何使用ConfigMap中的数据配置Pod(容器组)。
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-intermediate/config/secrets/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 65
layout: LearningLayout
description: Kubernetes教程_在Kubernetes中_配置和使用_Secret
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-intermediate/persistent/pv.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 60
layout: LearningLayout
description: Kubernetes教程_本文介绍了存储卷PersistentVolume_存储卷声明PersistentVolumeClaim的概念_他们的关系_以及如何使用
---
Expand Down
1 change: 1 addition & 0 deletions learning/k8s-intermediate/persistent/storage-class.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
vssueId: 61
layout: LearningLayout
description: Kubernetes教程_本文介绍了存储类的概念及其使用
---
Expand Down
Loading

0 comments on commit 1b69a42

Please sign in to comment.