Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
110 lines (97 loc) · 3.43 KB
/
Copy pathindex.html
File metadata and controls
110 lines (97 loc) · 3.43 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>WuYi's Blog</title>
<!-- <link rel="icon" href="favicon.ico"> -->
<!-- Docsify CSS -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
<!-- KaTeX for math formulas -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
<!-- Prism for code highlighting -->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-tomorrow.min.css">
<style>
:root {
--theme-color: #42b983;
--sidebar-width: 300px;
}
/* Custom styles */
.markdown-section {
max-width: 900px;
}
/* Math formula styles */
.markdown-section .katex {
font-size: 1.1em;
}
/* 限制 Markdown 中的图片大小并居中,添加边框和阴影 */
.markdown-section img {
max-width: min(600px, 100%);
height: auto;
display: block;
margin: 1em auto;
border: 1px solid #e1e4e8;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 4px;
background-color: #fff;
}
</style>
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'WuYi\'s Blog',
repo: 'https://github.com/NickYadance/NickYadance.github.io',
loadSidebar: true,
subMaxLevel: 2,
auto2top: true,
coverpage: false,
search: {
maxAge: 86400000, // 过期时间,单位毫秒,默认一天
paths: 'auto',
placeholder: '搜索',
noData: '找不到结果!',
depth: 6
},
// 插件配置
plugins: [
function(hook, vm) {
// 渲染数学公式
hook.doneEach(function() {
if (window.renderMathInElement) {
const markdownSection = document.querySelector('.markdown-section');
if (markdownSection) {
// 使用 KaTeX auto-render 插件渲染数学公式
renderMathInElement(markdownSection, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false}
],
throwOnError: false,
errorColor: '#cc0000'
});
}
}
});
}
]
};
</script>
<!-- Docsify core -->
<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
<!-- Docsify plugins -->
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/external-script.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>
<!-- Prism for code highlighting -->
<script src="//cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<!-- KaTeX for math formulas -->
<script src="//cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"></script>
</body>
</html>