-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path_config.yml
294 lines (289 loc) · 12.6 KB
/
_config.yml
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
baseurl: /miniWiki # place folder name if the site is served in a subfolder
defaults: # 将所有配置选项使用<https://jekyllrb.com/docs/configuration/front-matter-defaults/>功能进行配置
- scope:
path: "" # an empty string here means all files in the project
values: # 以下配置项也可以在任意页面自定义
jekyll-theme-WuK: # 我的主题的自定义样式都在这个命名空间
default:
body:
theme-base: theme-base-0f # 可选的主题色包括08~0f,见 <https://github.com/poole/lanyon>
layout-reverse: false # 开启后sidebar在右边,反之左边
sidebar-overlay: false # 开启后正文不随sidebar移动而移动
append_to_head: # 通过内嵌html的方式引入并定制插件,删改前确定知道自己在做什么。定制插件的方式可以参考这篇文章 <https://wu-kan.cn/_posts/2019-01-18-基于Jekyll搭建个人博客/>
- | #一些页面优化标签,看不懂可跳过
<meta
name="viewport"
content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<meta
http-equiv="content-type"
content="text/html; charset=utf-8"
/>
- | # PVC-style
<link
rel="stylesheet"
href="/miniWiki/assets/css/pvcstyle.css"
/>
- | # 网站小图标,可换成你自己的图片,改href中的部分即可
<link
rel="apple-touch-icon-precomposed"
href="/miniWiki/assets/cat.jpg?s=320"
/>
<link
rel="shortcut
icon"
href="/miniWiki/assets/cat.jpg?s=32"
/>
- | # 来自lanyon的页面样式,不要改
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/combine/gh/poole/[email protected]/public/css/poole.min.css,gh/poole/[email protected]/public/css/lanyon.min.css,gh/poole/[email protected]/public/css/syntax.min.css"
/>
- | # 用js引入fontawesome图标样式,功能更丰富
<script
async="async"
src="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/js/all.min.js"
></script>
- | # 网页标题使用加粗字号
<style>
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: bold;
}
</style>
- | # 修复行内图片默认样式
<style>
img {
display: inline-block;
margin: 0;
}
</style>
- | # 彩虹滚动条,仅对Chrome系浏览器生效
<style>
::-webkit-scrollbar {
width: 3px;
height: 3px;
}
::-webkit-scrollbar-thumb {
background-image: linear-gradient(45deg, Cyan 0%, Magenta 50%, Yellow 100%);
}
</style>
- | # 选中字体颜色
<style>
::selection {
color: White;
background: Black;
}
</style>
sidebar: # 此配置项下是一些关于侧边栏的配置
disable: false # 是否不显示sidebar
avatar: # 侧边栏显示的头像
enable: true
img: /miniWiki/assets/cat.jpg # 头像的地址
nav: # 导航部分的内容,你也可以自己增加文字、图标(来自fontawesome)和对应的链接
- title: '<i class="fas fa-home fa-fw"></i> 首页'
href: /miniWiki/ # https://pvc1989.github.io/miniWiki/ or http://<host>:<port>/miniWiki/
- title: '<i class="fas fa-tags fa-fw"></i> 数学'
href: /miniWiki/#数学
- title: '<i class="fas fa-tags fa-fw"></i> 物理'
href: /miniWiki/#物理
- title: '<i class="fas fa-tags fa-fw"></i> 算法'
href: /miniWiki/#算法
- title: '<i class="fas fa-tags fa-fw"></i> 编程'
href: /miniWiki/#编程
- title: '<i class="fas fa-tags fa-fw"></i> C/C++'
href: /miniWiki/programming/languages/cpp
- title: '<i class="fas fa-tags fa-fw"></i> Python'
href: /miniWiki/programming/languages/python
- title: '<i class="fas fa-tags fa-fw"></i> 文档'
href: /miniWiki/#文档
jekyll-toc: # 侧边栏的目录插件,https://github.com/allejo/jekyll-toc
enable: true
prepend: | # 目录过长时自动折叠
<style>
#toc {
overflow: auto auto;
max-height: 66.6vh;
}
</style>
append_to_sidebar:
- | # 修复点击侧边栏按钮回到顶部的问题
<style>
.sidebar-checkbox {
display: none;
}
.sidebar-toggle {
position: fixed;
}
.sidebar {
left: -24rem;
width: 24rem;
}
#sidebar-checkbox:checked ~ .sidebar,
#sidebar-checkbox:checked ~ .wrap,
#sidebar-checkbox:checked ~ .sidebar-toggle {
-webkit-transform: translateX(24rem);
-ms-transform: translateX(24rem);
transform: translateX(24rem);
}
</style>
- | # 侧边栏头像效果
<style>
.effect {
margin: 1rem;
perspective: 900px;
}
.effect-info {
text-align: center;
backface-visibility: hidden;
position: absolute;
top: 0;
transform-style: preserve-3d;
}
.effect-img {
z-index: 11;
width: 100%;
height: 100%;
position: relative;
transition: all 0.5s ease-in-out;
}
.effect-img:before {
position: absolute;
display: block;
}
.effect-right_to_left .effect-img {
transform-origin: 0% 50%;
}
.effect-right_to_left:hover .effect-img {
transform: rotate3d(0, 1, 0, -180deg);
}
</style>
- | # 觉得我的内容不错,让更多的人知道它吧!
<div>
<i class="fa-brands fa-github fa-fw"></i>
<a href="https://github.com/pvc1989/miniWiki">
Fork/Star me on GitHub
</a>
</div>
page:
masthead: # 显示顶栏
enable: true
mathjax: # 数学公式
enable: true
append: |
<script src="/miniWiki/assets/js/mathjax-load.js" async></script>
mermaid: # mermaid图插件
enable: true
append: |
<style>
pre.language-mermaid,
code.language-mermaid {
display: none;
}
.mermaid {
overflow: auto auto;
max-width: 100%;
max-height: 66.6vh;
}
</style>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"
async="async"
onload='
for(let x of document.getElementsByClassName("language-mermaid"))
if(x.nodeName=="CODE")
{
let m = document.createElement("div");
m.classList.add("mermaid");
m.textContent = x.textContent;
x.parentNode.insertAdjacentElement("beforebegin", m);
}'
></script>
prism: # 代码高亮插件
enable: true
append: |
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/combine/npm/[email protected]/plugins/line-numbers/prism-line-numbers.min.css,npm/[email protected]/plugins/toolbar/prism-toolbar.min.css,gh/PrismJS/prism-themes@1955cfef6953b3a59e66016e8a1e016b45d6cc79/themes/prism-ghcolors.min.css"
/>
<style>
code { background-color: transparent; padding: 0; }
</style>
<script
src="https://cdn.jsdelivr.net/combine/npm/[email protected]/components/prism-core.min.js,npm/[email protected]/plugins/autoloader/prism-autoloader.min.js,npm/[email protected]/plugins/line-numbers/prism-line-numbers.min.js,npm/[email protected]/plugins/toolbar/prism-toolbar.min.js"
async="async"
onload='
Prism.plugins.autoloader.languages_path = "https:\/\/cdn.jsdelivr.net/npm/prismjs/components/";
for(let x of document.getElementsByTagName("pre"))
x.classList.add("line-numbers");
Prism.plugins.toolbar.registerButton("select-code", function (env) {
let button = document.createElement("button");
button.textContent = "select this " + env.language;
button.addEventListener("click", function () {
if (document.body.createTextRange) {
let range = document.body.createTextRange();
range.moveToElementText(env.element);
range.select();
} else if (window.getSelection) {
let selection = window.getSelection();
let range = document.createRange();
range.selectNodeContents(env.element);
selection.removeAllRanges();
selection.addRange(range);
}
});
return button;
})'
></script>
prepend:
- | # 增加宽屏下的显示内容
<style>
.container {
min-width: 66.6%;
}
</style>
- | # 给文章加上磨砂背景,防止被背景影响阅读;同时加上加载动画
<style>
.masthead,
.container.content {
padding-top: 1rem;
padding-bottom: 1rem;
margin-bottom: 1.5rem;
box-shadow: 0 0 .75rem rgba(0, 0, 0, 0.1);
background-color: rgba(255,255,255,.8);
animation-duration: 2s;
animation-name: fadeIn;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
# githubpage上支持的插件见<https://pages.github.com/versions/>
plugins: # <https://jekyllrb.com/docs/plugins/>
- jekyll-readme-index # 使用readme做index,从而和github渲染效果一致
- jekyll-default-layout # 为每个markdown自动生成layout
- jekyll-seo-tag # 为每个页面生成标题
- jekyll-sitemap # 为站点生成站点地图
- jekyll-feed # 为站点生成RSS源
- jekyll-remote-theme # 使用remote_theme插件实现主题的前后分离,详见<https://github.com/benbalter/jekyll-remote-theme/>
remote_theme: https://github.com/pvc1989/jekyll-theme-WuK
readme_index: # 缺失index.md和index.html时,使用README.md代替之
with_frontmatter: true # 支持带有yaml头的README
markdown: kramdown
kramdown: # 见<https://kramdown.gettalong.org/options.html>
input: GFM # 见<http://jekyllcn.com/docs/configuration/#kramdown>
syntax_highlighter_opts: # 可见<https://kramdown.gettalong.org/syntax_highlighter/rouge.html>
block:
disable: true # 关掉代码块默认的高亮,换用 prismjs
line_numbers: false #渲染出来的效果好鬼畜
span:
disable: true