-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
269 lines (248 loc) · 11.7 KB
/
index.html
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Bajins</title>
<link rel="icon" href="/images/icons/logo.png">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<!-- Theme: Simple (latest v0.x.x) -->
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css"> -->
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/buble.css"> -->
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/dark.css"> -->
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/pure.css"> -->
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/dolphin.css"> -->
<link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = { // https://docsify.js.org/#/zh-cn/configuration
el: '#app',
name: 'Bajins',
nameLink: '/', // 点击文档标题后跳转的链接地址
// 基础路径
basePath: '/',
// 路由模式与基础路径配合
//routerMode: 'history',
repo: 'https://github.com/woytu/notes-docsify',
//loadNavbar: true,
loadNavbar: 'nav.md',
// loadSidebar: true,
// subMaxLevel: 0,
// loadSidebar: '../sidebar.md',
// 小屏设备下合并导航栏到侧边栏。
mergeNavbar: true,
auto2top: true,
//logo: '/images/icons/favicon-32x32.png',
//themeColor: '#3F51B5',
//autoHeader: true,
formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}:{ss}',
search: 'auto',
auto2top: true, // 切换页面后是否自动跳转到页面顶部
// 完整配置参数
search: {
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
paths: 'auto', // or 'auto'
placeholder: '搜索',
// 支持本地化
placeholder: {
'/': '搜索',
},
noData: '找不到结果!',
// 支持本地化
noData: {
'/': '找不到结果!',
},
// 搜索标题的最大程级, 1 - 6
depth: 2
},
//disqus: 'bajins',
//plugins: [
//EditOnGithubPlugin.create(docBase, docEditBase, title)
//],
ga: 'UA-137200206-1',
markdown: {
// https://marked.js.org/#/USING_PRO.md#renderer
renderer: {
image: function(href, title) {
return `<img src="${href}" data-origin="${href}" alt="${title}">`
}
}
},
// https://docsify.js.org/#/zh-cn/write-a-plugin
plugins: [
// 如果需要用 docsify 的内部方法,可以通过 window.Docsify 获取,通过 vm 获取当前实例。
function(hook, vm) {
// 初始化时调用,只调用一次,没有参数。
hook.init(function() {
// console.log("init");
})
// 初始化完成后调用,只调用一次,没有参数。
hook.mounted(function() {
// console.log("moubted");
})
// 每次开始解析 Markdown 内容时调用
hook.beforeEach(function(content) {
// console.log("beforeEach");
// let reg = new RegExp("/images", 'ig');
// return content.replace(reg, "../images");
return content;
})
// 解析成 html 后调用。beforeEach 和 afterEach 支持处理异步逻辑
hook.afterEach(function(html, next) {
// console.log("afterEach");
// let reg = new RegExp(`${vm.config.basePath}.*/images`, 'ig');
// html = html.replace(reg, `${vm.config.basePath}images`);
// 异步处理完成后调用 next(html) 返回结果
next(html);
})
// 每次路由切换时数据全部加载完成后调用,没有参数。
hook.doneEach(function() {
// console.log("doneEach");
})
// 初始化并第一次加载完成数据后调用,没有参数。
hook.ready(function() {
// console.log("ready");
})
},
],
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/prismjs@1.16.0/prism.js"></script>
<!-- 全文搜索 - Search -->
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<!-- 谷歌统计 - Google Analytics -->
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
<!-- 默认是提供 emoji 解析的,能将类似 :100: 解析成 100 -->
<script src="//unpkg.com/docsify/lib/plugins/emoji.js"></script>
<!-- 在所有的代码块上添加一个简单的Click to copy按钮来允许用户从你的文档中轻易地复制代码。 -->
<script src="//unpkg.com/docsify-copy-code"></script>
<!-- docsify的分页导航插件 -->
<script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
<!-- 在每一页上添加 Edit on github 按钮. -->
<!-- <script src="//unpkg.com/docsify-edit-on-github/index.js"></script> -->
<!-- Disqus评论系统支持。 https://disqus.com/ -->
<!-- <script src="//unpkg.com/docsify/lib/plugins/disqus.min.js"></script> -->
<!-- docsify-themeable (latest v0.x.x) -->
<!-- <script src="https://cdn.jsdelivr.net/npm/docsify-themeable@0"></script> -->
<!-- <script src="//unpkg.com/docsify/lib/plugins/gitalk.min.js"></script> -->
<!-- <script src="//unpkg.com/gitalk/dist/gitalk.min.js"></script> -->
<!-- <script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script> -->
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
<!-- 各评论系统 -->
<script>
// https://github.com/settings/applications/new 注册一个新的 OAuth Application
//unpkg.com/docsify/lib/plugins/gitalk.min.js
/*$docsify.plugins = [].concat(function (i) {
var e = Docsify.dom;
// 初始化完成后调用 ,只调用一次,没有参数。
i.mounted(function (i) {
var n = e.create("div");
n.id = "gitalk-container";
var t = e.getNode("#main");
n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;", e.appendTo(e.find(".content"),n);
});
// 每次路由切换时数据全部加载完成后调用,没有参数。
i.doneEach(function (i) {
for (var n = document.getElementById("gitalk-container"); n.hasChildNodes();) {
n.removeChild(n.firstChild)
};
gitalk.render("gitalk-container");
})
}, $docsify.plugins);
const gitalk = new Gitalk({
clientID: '40cfe11992c4ef076a4b',
clientSecret: 'b43dc6b3740a306bec40c25c2db1ecc6c02e7716',
repo: 'woytu.github.io',
owner: 'woytu',
admin: ['woytu'],
// facebook-like distraction free mode
distractionFreeMode: false
});*/
// https://imsun.net/posts/gitment-introduction/
/*$docsify.plugins = [].concat(function (i) {
var e = Docsify.dom;
// 初始化完成后调用 ,只调用一次,没有参数。
i.mounted(function (i) {
var n = e.create("div");
n.id = "gitment-container";
var t = e.getNode("#main");
n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;", e.appendTo(e.find(".content"),n);
});
// 每次路由切换时数据全部加载完成后调用,没有参数。
i.doneEach(function (i) {
for (var n = document.getElementById("gitment-container"); n.hasChildNodes();) {
n.removeChild(n.firstChild)
};
gitment.render("gitment-container");
});
}, $docsify.plugins);
var gitment = new Gitment({
//id: '页面 ID', // 可选。默认为 location.href
owner: 'woytu',
repo: 'woytu.github.io',
oauth: {
client_id: '40cfe11992c4ef076a4b',
client_secret: 'b43dc6b3740a306bec40c25c2db1ecc6c02e7716',
},
});*/
// Valine https://valine.js.org/configuration.html
$docsify.plugins = [].concat(function(hook, vm) {
var e = Docsify.dom;
// 初始化完成后调用 ,只调用一次,没有参数。
hook.mounted(function(i) {
var t = e.getNode("#main");
var n = e.create("div");
n.id = "vcomments";
n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;", e.appendTo(e.find(".content"), n);
});
// 每次路由切换时数据全部加载完成后调用,没有参数。
// hook.doneEach(function (i) {
// for (var n = document.getElementById("vcomments"); n.hasChildNodes();) {
// n.removeChild(n.firstChild);
// }
// });
}, $docsify.plugins);
new Valine({
el: '#vcomments',
appId: 'm9S5QXsdju39LvMs8ooRRIiF-MdYXbMMI',
appKey: 'UfBRjySkb4bjPiFuH0Pxe3a9',
placeholder: 'ヾノ≧∀≦)o来啊,快活啊!',
notify: true, // 邮件提醒
verify: false, // 验证码服务
// 当前文章页路径,用于区分不同的文章页,以保证正确读取该文章页下的评论列表。
path: window.location.href,
visitor: true, // 文章访问量统计
recordIP: true, // 是否记录评论者IP
});
// 来必力 https://www.livere.com
/*$docsify.plugins = [].concat(function (hook, vm) {
var e = Docsify.dom;
// 初始化完成后调用 ,只调用一次,没有参数。
hook.mounted(function (i) {
var t = e.getNode("#main");
var n = e.create("div");
n.id = "lv-container";
n.setAttribute("data-id", "city");
n.setAttribute("data-uid", "MTAyMC80NTE3MC8yMTY4OA==");
n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;", e.appendTo(e.find(".content"), n);
});
}, $docsify.plugins);
(function (d, s) {
var j, e = d.getElementsByTagName(s)[0];
if (typeof LivereTower === 'function') {
return;
}
j = d.createElement(s);
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
j.async = true;
e.parentNode.insertBefore(j, e);
})(document, 'script');*/
</script>
</body>
</html>