-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
113 lines (90 loc) · 2.78 KB
/
index.html
File metadata and controls
113 lines (90 loc) · 2.78 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<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="http://www.guofei.site/reading/vue.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: '',
repo: ''
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<!-- <script>
window.$docsify = {
loadSidebar: true,
// 增加侧边栏
subMaxLevel: 3
};
</script> -->
<!-- <script src="//unpkg.com/docsify"></script> -->
<script>
window.$docsify = {
loadSidebar: true,
// 增加侧边栏
subMaxLevel: 3,
loadNavbar: true,
// 右上角的小下拉图标
//
// maxLevel: 3,
// 封面
coverpage: true,
homepage: '_main.md',
// 切换页面后,自动滚动到顶部
auto2top: true,
search: 'auto',
// mermaid支持
markdown: {
renderer: {
code: function(code, lang) {
if (lang === "mermaid") {
return (
'<div class="mermaid">' + mermaid.render(lang, code) + "</div>"
);
}
return this.origin.code.apply(this, arguments);
}
}
},
// edit on github, 原理没看懂,官网上粘过来的
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
var url
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master')
} else {
url = 'https://github.com/guofei9987/Matlab_notes/blob/master/' + vm.route.file
}
var editHtml = '[:memo: Edit](' + url + ')\n'
return editHtml
+ html
+ '\n\n----\n\n'
// + 'Last modified {docsify-updated} '
+ ' '
+ editHtml
})
}
]
};
</script>
<!-- <script src="//unpkg.com/docsify"></script> -->
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<!-- mermaid支持: -->
<script src="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.css">
<!-- 代码高亮 -->
<script src="//unpkg.com/prismjs/components/prism-python.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-matlab.min.js"></script>
</body>
</html>