forked from eip-work/kuboard-press
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
166 lines (162 loc) · 8.21 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
let dateFns = require('date-fns')
module.exports = {
// configureWebpack: () => ({
// devtool: 'source-map'
// }),
modules: ['bootstrap-vue/nuxt'],
title: 'Kuboard官网',
description: '一款Kubernetes_Dashboard_简化Kubernetes的学习和使用_帮助您快速落地Kubernetes_提供_Kubernetes_免费中文教程_国内安装文档',
head: [
// ['meta', {name: 'keywords', content: 'Kubernetes教程,Kubernetes安装,K8S教程,K8S安装,Kubernetes管理界面'}],
['link', { rel: 'icon', href: '/favicon.png' }],
['link', { rel: 'manifest', href: '/manifest.json' }],
// ['link', { rel: 'stylesheet', href: '/grey.css'}],
['meta', { name: 'theme-color', content: '#007af5' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
['script', {}, `
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?5434e5c7a3fe924c0d6c5bd6f0eae56b";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`],
['script', { 'data-ad-client': "ca-pub-3313149841665250", async: true, src: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"}],
// ['script', { type: 'text/javascript', src: '//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js', 'data-dojo-config': 'usePlainJson: true, isDebug: false'}],
// ['script', { type: 'text/javascript'}, `window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us20.list-manage.com","uuid":"2273cb19eb20bb1bc5b7745a7","lid":"f1f25d6dac","uniqueMethods":true}) })`],
],
markdown: {
toc: { includeLevel: [2, 3] },
lineNumbers: true,
externalLinks: { target: '_blank', rel: 'nofollow', onclick: 'openOutboundLink(this)' }
},
dest: 'docs',
plugins: {
'@vuepress/active-header-links': {},
'@vuepress/google-analytics':
{
ga: 'UA-144196556-1',
},
'@vuepress/back-to-top': {},
'@vuepress/last-updated': {
transformer: (timestamp, lang) => {
return dateFns.format(timestamp, 'yyyy-MM-dd HH:mm:ss')
}
},
'vuepress-plugin-code-copy': {
successText: '已复制到剪贴板!',
align: 'bottom',
backgroundColor: '#FFFFFF',
color: '#FFFFFF',
// selector: 'div[class*="language-"] pre'
selector: 'div[class*="language-"] pre'
},
// '@vuepress/pwa': {
// serviceWorker: true,
// // popupComponent: 'KbSWUpdatePopup',
// updatePopup: {
// '/': {
// message: "Kuboard官网已更新",
// buttonText: "点击刷新"
// }
// }
// },
// '@vuepress/pwa': {
// serviceWorker: true,
// updatePopup: true
// },
'@vssue/vuepress-plugin-vssue': {
// set `platform` rather than `api`
platform: 'github-v4',
locale: 'zh-CN',
autoCreateIssue: false,
admins: ['shaohq'],
// all other options of Vssue are allowed
owner: 'eip-work',
repo: 'kuboard-press',
// clientId: 'f96af83d4bff4e2b9e3e',
// clientSecret: 'cf5686d68d4aab6d3bfa256da9a714049b239c1f',
},
'named-chunks': {
pageChunkName: page => 'page' + page.key.slice(1),
layoutChunkName: layout => 'layout-' + layout.componentName,
},
// 'vuepress-plugin-zooming': {
// // 支持点击缩放的图片元素的选择器
// // 默认值: '.theme-default-content img'
// selector: '.theme-default-content img',
// // 进入一个页面后,经过一定延迟后使页面中的图片支持缩放
// // 默认值: 500
// delay: 1000,
// // zooming 的 options
// // 默认值: {}
// options: {
// bgColor: 'black',
// zIndex: 10000,
// },
// },
// 'vuepress-plugin-smooth-scroll': {},
'code-switcher': {},
'reading-progress': {},
// 'vuepress-plugin-baidu-autopush':{},
'sitemap': {
hostname: 'https://kuboard.cn',
outFile: '3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRl.xml'
},
'seo': {
siteTitle: (_, $site) => $site.title,
title: $page => $page.title,
description: $page => $page.frontmatter.description,
author: (_, $site) => $site.themeConfig.author,
tags: $page => $page.frontmatter.tags,
// twitterCard: _ => 'summary_large_image',
type: $page => ['articles', 'posts', 'blog'].some(folder => $page.regularPath.startsWith('/' + folder)) ? 'article' : 'website',
url: (_, $site, path) => ($site.themeConfig.domain || '') + path,
image: ($page, $site) => $page.frontmatter.image && (($site.themeConfig.domain || '') + $page.frontmatter.image),
publishedAt: $page => $page.frontmatter.date && new Date($page.frontmatter.date),
modifiedAt: $page => $page.lastUpdated && new Date($page.lastUpdated),
}
},
themeConfig: {
incompleteRatio: 15,
showMoreAds: false,
showAds: true,
// kuboardToken: 'eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJvYXJkLXZpZXdlci10b2tlbi1mdGw0diIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJrdWJvYXJkLXZpZXdlciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6ImE1YWFiMmQxLTQxMjYtNDU5Yi1hZmNhLTkyYzMwZDk0NTQzNSIsInN1Yi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AxXzF7mJqXnNetbJw-8-x_L3ogSsDlTKmRucao96VA2tPKxel8pM04J8MU0ZmYgWhTJelibbxmQK3jwGM4x32bckOOvmtumcXdsBRN0z1SZ1iu4H0VoaswhfoFS4ZJKoe61xyqoDhQx4RLCVJh_-Uctd5RCcPLWFEk-BHqC8vUTy8QcRst6RIIozQdTqsv7Xs6bH6dHrHFS--eVVTH2orQdm8znuUFhlqFOOjmCIMzIlaUQC_SO9URIGYOs0jrk27N9KC0HvQ5dLgFmwyNJ0Gu7cYi23NP1A',
nav: [
// { text: '简介', link: '/overview/' },
{ text: '安装', link: '/install/install-dashboard' },
{ text: '教程', link: '/learning/' },
{ text: '使用', link: '/guide/' },
{ text: '支持', link: '/support/' },
// { text: '培训', link: 'https://kubetrain.cn/?from=kuboard', target: '_blank' },
// { text: '博客', link: 'http://k8s.kubetrain.cn/' },
// { text: '论坛', link: 'http://bbs.kuboard.cn/', target: '_blank' },
// { text: 'DevOps', link: '/devops/' }
],
displayAllHeaders: false,
sidebarDepth: 2,
serviceWorker: {
updatePopup: true
},
lastUpdated: '更新时间',
// 假定是 GitHub. 同时也可以是一个完整的 GitLab URL
repo: 'eip-work/kuboard-press',
// 自定义仓库链接文字。默认从 `themeConfig.repo` 中自动推断为
// "GitHub"/"GitLab"/"Bitbucket" 其中之一,或是 "Source"。
repoLabel: '文档仓库',
// 假如你的文档仓库和项目本身不在一个仓库:
docsRepo: 'eip-work/kuboard-press',
// 假如文档不是放在仓库的根目录下:
docsDir: '',
// 假如文档放在一个特定的分支下:
docsBranch: 'master',
// 默认是 false, 设置为 true 来启用
editLinks: true,
// 默认为 "Edit this page"
editLinkText: '帮助我们改善此页面!',
sidebar: require('./config-sidebar')
}
}