-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
1880 lines (1874 loc) · 505 KB
/
atom.xml
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://akiting01.github.io/shoka</id>
<title>纸筏</title>
<subtitle>给岁月以文明,给文明以岁月</subtitle>
<icon>https://akiting01.github.io/shoka/images/favicon.ico</icon>
<link href="https://akiting01.github.io/shoka" />
<author>
<name>Akiting</name>
</author>
<updated>2022-08-07T11:10:21.000Z</updated>
<category term="paper website" />
<category term="shoka" />
<entry>
<id>https://akiting01.github.io/shoka/%E5%9B%BE%E5%BA%8A/</id>
<title>图床</title>
<link rel="alternate" href="https://akiting01.github.io/shoka/%E5%9B%BE%E5%BA%8A/"/>
<content type="html"><p><span class="exturl" data-url="aHR0cHM6Ly9zMS4zMjg4ODgueHl6LzIwMjIvMDgvMDcvdWlnOXcucG5n">图床</span></p>
</content>
<updated>2022-08-07T11:10:21.000Z</updated>
</entry>
<entry>
<id>https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/special/</id>
<title>Step.4 主题特殊功能</title>
<link rel="alternate" href="https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/special/"/>
<content type="html"><div class="note primary">
<p><a href="/computer-science/note/theme-shoka-doc/">🚀快速开始</a> - <a href="/computer-science/note/theme-shoka-doc/dependents/">💌依赖插件</a> - <a href="/computer-science/note/theme-shoka-doc/config/">📌基本配置</a> - <a href="/computer-science/note/theme-shoka-doc/display/">🌈界面显示</a> - <a href="/computer-science/note/theme-shoka-doc/special/"><strong>🦄特殊功能</strong></a></p>
</div>
<div class="note info">
<p>以下介绍可以使用的 markdown 或者标签代码。<br />
功能大部分基于 <code>hexo-renderer-multi-markdown-it</code> 渲染器,尤其是代码块的显示,与默认渲染器不兼容。</p>
</div>
<h1 id="links-链接块"><a class="anchor" href="#links-链接块">#</a> <code>links</code> 链接块</h1>
<p>本功能参考 NexT,基于 Hexo Tag 功能,用来建立友链或其他网址链接功能。</p>
<p>文章中的使用格式:</p>
<ol>
<li>使用 <code>links</code> 标签块,包围 <code>yml</code> 语法书写的内容,字段包括</li>
</ol>
<table>
<tbody>
<tr>
<td><code>site</code></td>
<td>站点名称</td>
<td>必填</td>
</tr>
<tr>
<td><code>owner</code></td>
<td>管理员名字</td>
<td>可选,默认为 <code>site</code> 的值</td>
</tr>
<tr>
<td><code>url</code></td>
<td>站点链接</td>
<td>必填</td>
</tr>
<tr>
<td><code>desc</code></td>
<td>站点描述</td>
<td>可选,默认为 <code>url</code> 的值</td>
</tr>
<tr>
<td><code>image</code></td>
<td>站点图片</td>
<td>可选,默认为 <code>images/404.png</code></td>
</tr>
<tr>
<td><code>color</code></td>
<td>方块颜色</td>
<td>可选,默认为 <code>#666</code></td>
</tr>
</tbody>
</table>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>&#123;% links %&#125;</pre></td></tr><tr><td data-num="2"></td><td><pre>- site: #站点名称</pre></td></tr><tr><td data-num="3"></td><td><pre> owner: #管理员名字</pre></td></tr><tr><td data-num="4"></td><td><pre> url: #站点网址</pre></td></tr><tr><td data-num="5"></td><td><pre> desc: #简短描述</pre></td></tr><tr><td data-num="6"></td><td><pre> image: #一张图片</pre></td></tr><tr><td data-num="7"></td><td><pre> color: #颜色代码</pre></td></tr><tr><td data-num="8"></td><td><pre>&#123;% endlinks %&#125;</pre></td></tr></table></figure><p>举个栗子:</p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>&#123;% links %&#125;</pre></td></tr><tr><td data-num="2"></td><td><pre>- site: 優萌初華</pre></td></tr><tr><td data-num="3"></td><td><pre> owner: 霜月琉璃</pre></td></tr><tr><td data-num="4"></td><td><pre> url: https:&#x2F;&#x2F;shoka.lostyu.me</pre></td></tr><tr><td data-num="5"></td><td><pre> desc: 琉璃的医学 &amp; 编程笔记</pre></td></tr><tr><td data-num="6"></td><td><pre> image: https:&#x2F;&#x2F;cdn.jsdelivr.net&#x2F;gh&#x2F;amehime&#x2F;shoka@latest&#x2F;images&#x2F;avatar.jpg</pre></td></tr><tr><td data-num="7"></td><td><pre> color: &quot;#e9546b&quot;</pre></td></tr><tr><td data-num="8"></td><td><pre></pre></td></tr><tr><td data-num="9"></td><td><pre>- site: 優萌初華</pre></td></tr><tr><td data-num="10"></td><td><pre> owner: 霜月琉璃</pre></td></tr><tr><td data-num="11"></td><td><pre> url: https:&#x2F;&#x2F;shoka.lostyu.me</pre></td></tr><tr><td data-num="12"></td><td><pre> image: images&#x2F;avatar.jpg</pre></td></tr><tr><td data-num="13"></td><td><pre></pre></td></tr><tr><td data-num="14"></td><td><pre>- site: 優萌初華</pre></td></tr><tr><td data-num="15"></td><td><pre> url: https:&#x2F;&#x2F;shoka.lostyu.me</pre></td></tr><tr><td data-num="16"></td><td><pre> desc: 琉璃的医学 &amp; 编程笔记</pre></td></tr><tr><td data-num="17"></td><td><pre> color: &quot;#9d5b8b&quot;</pre></td></tr><tr><td data-num="18"></td><td><pre>&#123;% endlinks %&#125;</pre></td></tr></table></figure><p><div class="links"><div class="item" title="霜月琉璃" style="--block-color:#e9546b;"><span class="exturl image" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=" data-background-image="https://cdn.jsdelivr.net/gh/amehime/shoka@latest/images/avatar.jpg"></span>
<div class="info">
<span class="exturl title" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=">優萌初華</span>
<p class="desc">琉璃的医学 & 编程笔记</p>
</div></div><div class="item" title="霜月琉璃"><span class="exturl image" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=" data-background-image="/images/avatar.jpg"></span>
<div class="info">
<span class="exturl title" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=">優萌初華</span>
<p class="desc">https://shoka.lostyu.me</p>
</div></div><div class="item" title="優萌初華" style="--block-color:#9d5b8b;"><span class="exturl image" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=" data-background-image="/images/404.png"></span>
<div class="info">
<span class="exturl title" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=">優萌初華</span>
<p class="desc">琉璃的医学 & 编程笔记</p>
</div></div></div></p>
<ol start="2">
<li>以上标签块里的内容,还可以保存到一个 <code>yml</code> 文件中,然后使用 <code>linksfile</code> 标签。<br />
其中, <code>path</code> 位于 <code>&lt;root&gt;/source</code> 目录下。</li>
</ol>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>&#123;% linksfile [path] %&#125;</pre></td></tr></table></figure><p>举个栗子:</p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>&#123;% linksfile friends&#x2F;_data.yml %&#125;</pre></td></tr></table></figure><h1 id="code代码块"><a class="anchor" href="#code代码块">#</a> <code>code</code> 代码块</h1>
<p>使用 <code>markdown-it-prism</code> 进行代码高亮,支持显示行号、行高亮 <code>mark</code> 、命令行提示符 <code>command</code> 、代码块标题。</p>
<p>基本格式: <code>[language] [title] [url] [link text] [mark] [command]</code></p>
<table>
<thead>
<tr>
<th>选项</th>
<th>描述</th>
<th>默认值</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>language</p>
</td>
<td>
<ul>
<li>支持的语言<span class="exturl" data-url="aHR0cHM6Ly9wcmlzbWpzLmNvbS8jc3VwcG9ydGVkLWxhbmd1YWdlcw==">戳此</span></li>
<li>如果不需要代码高亮,但希望显示代码块样式,则设为 <code>raw</code></li>
<li>留空或设为 <code>info</code> ,将不显示代码高亮和代码块样式</li>
</ul>
</td>
<td>
<p>null</p>
</td>
</tr>
<tr>
<td>title</td>
<td>代码块的标题文字</td>
<td>null</td>
</tr>
<tr>
<td>url</td>
<td>代码块标题右侧显示的链接</td>
<td>null</td>
</tr>
<tr>
<td>link text</td>
<td>上述链接显示的标题</td>
<td>link</td>
</tr>
<tr>
<td>
<p>mark</p>
</td>
<td>
<p>行高亮显示,格式为 <code>mark:行号,行号开始-行号结束,其他行号</code> 。<br />
例如 <code>mark:1,4-7,10</code> ,将高亮显示第 1、4、5、6、7、10 行</p>
</td>
<td>
<p>null</p>
</td>
</tr>
<tr>
<td>
<p>command</p>
</td>
<td>
<p>命令行提示符,格式为 <code>command:(&quot;提示内容&quot;:行号,行号||&quot;提示内容&quot;:行号开始-行号结束)</code> <br />
例如 <code>command:(&quot;[root@localhost] $&quot;:1,9-10||&quot;[admin@remotehost] #&quot;:4-6)</code></p>
</td>
<td>
<p>null</p>
</td>
</tr>
</tbody>
</table>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>&#96;&#96;&#96;java 行高亮 https:&#x2F;&#x2F;shoka.lostyu.me 参考链接 mark:1,6-7</pre></td></tr><tr><td data-num="2"></td><td><pre>import java.util.Scanner;</pre></td></tr><tr><td data-num="3"></td><td><pre>...</pre></td></tr><tr><td data-num="4"></td><td><pre>Scanner in &#x3D; new Scanner (System.in);</pre></td></tr><tr><td data-num="5"></td><td><pre>&#x2F;&#x2F; 输入 Scan 之后,按下键盘 Alt + “&#x2F;” 键,Eclipse 下自动补全。</pre></td></tr><tr><td data-num="6"></td><td><pre></pre></td></tr><tr><td data-num="7"></td><td><pre>System.out.println (in.nextLine ());</pre></td></tr><tr><td data-num="8"></td><td><pre>System.out.println (&quot;Hello&quot; + &quot;world.&quot;);</pre></td></tr><tr><td data-num="9"></td><td><pre>&#96;&#96;&#96;</pre></td></tr><tr><td data-num="10"></td><td><pre></pre></td></tr><tr><td data-num="11"></td><td><pre>&#96;&#96;&#96;bash 命令行提示符 command:(&quot;[root@localhost] $&quot;:1,9-10||&quot;[admin@remotehost] #&quot;:4-6)</pre></td></tr><tr><td data-num="12"></td><td><pre>pwd</pre></td></tr><tr><td data-num="13"></td><td><pre>&#x2F;usr&#x2F;home&#x2F;chris&#x2F;bin</pre></td></tr><tr><td data-num="14"></td><td><pre>ls -la</pre></td></tr><tr><td data-num="15"></td><td><pre>total 2</pre></td></tr><tr><td data-num="16"></td><td><pre>drwxr-xr-x 2 chris chris 11 Jan 10 16:48 .</pre></td></tr><tr><td data-num="17"></td><td><pre>drwxr--r-x 45 chris chris 92 Feb 14 11:10 ..</pre></td></tr><tr><td data-num="18"></td><td><pre>-rwxr-xr-x 1 chris chris 444 Aug 25 2013 backup</pre></td></tr><tr><td data-num="19"></td><td><pre>-rwxr-xr-x 1 chris chris 642 Jan 17 14:42 deploy</pre></td></tr><tr><td data-num="20"></td><td><pre>git add -A</pre></td></tr><tr><td data-num="21"></td><td><pre>git commit -m &quot;update&quot;</pre></td></tr><tr><td data-num="22"></td><td><pre>git push</pre></td></tr><tr><td data-num="23"></td><td><pre>&#96;&#96;&#96;</pre></td></tr></table></figure><figure class="highlight java"><figcaption data-lang="java"><span>行高亮</span><span class="exturl" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=">参考链接</span></figcaption><table><tr class="marked"><td data-num="1"></td><td><pre><span class="token keyword">import</span> <span class="token import"><span class="token namespace">java<span class="token punctuation">.</span>util<span class="token punctuation">.</span></span><span class="token class-name">Scanner</span></span><span class="token punctuation">;</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token class-name">Scanner</span> in <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Scanner</span><span class="token punctuation">(</span><span class="token class-name">System</span><span class="token punctuation">.</span>in<span class="token punctuation">)</span><span class="token punctuation">;</span></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token comment">// 输入 Scan 之后,按下键盘 Alt + “/” 键,Eclipse 下自动补全。</span></pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr class="marked"><td data-num="6"></td><td><pre><span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>in<span class="token punctuation">.</span><span class="token function">nextLine</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span></pre></td></tr><tr class="marked"><td data-num="7"></td><td><pre><span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token string">"Hello"</span> <span class="token operator">+</span> <span class="token string">" world."</span><span class="token punctuation">)</span><span class="token punctuation">;</span></pre></td></tr></table></figure><figure class="highlight bash"><figcaption data-lang="bash"><span>命令行提示符</span></figcaption><table><tr><td data-num="1"></td><td data-command="[root@localhost] $"></td><td><pre><span class="token builtin class-name">pwd</span></pre></td></tr><tr><td data-num="2"></td><td data-command=""></td><td><pre>/usr/home/chris/bin</pre></td></tr><tr><td data-num="3"></td><td data-command=""></td><td><pre><span class="token function">ls</span> -la</pre></td></tr><tr><td data-num="4"></td><td data-command="[admin@remotehost] #"></td><td><pre>total <span class="token number">2</span></pre></td></tr><tr><td data-num="5"></td><td data-command="[admin@remotehost] #"></td><td><pre>drwxr-xr-x <span class="token number">2</span> chris chris <span class="token number">11</span> Jan <span class="token number">10</span> <span class="token number">16</span>:48 <span class="token builtin class-name">.</span></pre></td></tr><tr><td data-num="6"></td><td data-command="[admin@remotehost] #"></td><td><pre>drwxr--r-x <span class="token number">45</span> chris chris <span class="token number">92</span> Feb <span class="token number">14</span> <span class="token number">11</span>:10 <span class="token punctuation">..</span></pre></td></tr><tr><td data-num="7"></td><td data-command=""></td><td><pre>-rwxr-xr-x <span class="token number">1</span> chris chris <span class="token number">444</span> Aug <span class="token number">25</span> <span class="token number">2013</span> backup</pre></td></tr><tr><td data-num="8"></td><td data-command=""></td><td><pre>-rwxr-xr-x <span class="token number">1</span> chris chris <span class="token number">642</span> Jan <span class="token number">17</span> <span class="token number">14</span>:42 deploy</pre></td></tr><tr><td data-num="9"></td><td data-command="[root@localhost] $"></td><td><pre><span class="token function">git</span> <span class="token function">add</span> -A</pre></td></tr><tr><td data-num="10"></td><td data-command="[root@localhost] $"></td><td><pre><span class="token function">git</span> commit -m <span class="token string">"update"</span></pre></td></tr><tr><td data-num="11"></td><td data-command=""></td><td><pre><span class="token function">git</span> push</pre></td></tr></table></figure><h1 id="quiz-练习题与答案"><a class="anchor" href="#quiz-练习题与答案">#</a> <code>quiz</code> 练习题与答案</h1>
<p>这个功能是用来显示练习题的。<br />
需要在 Front Matter 中添加 <code>quiz: true</code> ,以正确显示题型标签。</p>
<figure class="highlight raw"><figcaption data-lang=""><span>几个例子</span></figcaption><table><tr><td data-num="1"></td><td><pre>---</pre></td></tr><tr><td data-num="2"></td><td><pre>title: 练习题与答案</pre></td></tr><tr><td data-num="3"></td><td><pre>quiz: true</pre></td></tr><tr><td data-num="4"></td><td><pre>---</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre>1. 编译时多态主要指运算符重载与函数重载,而运行时多态主要指虚函数。 &#123;.quiz .true&#125;</pre></td></tr><tr><td data-num="7"></td><td><pre></pre></td></tr><tr><td data-num="8"></td><td><pre>2. 有基类 &#96;SHAPE&#96;,派生类 &#96;CIRCLE&#96;,声明如下变量: &#123;.quiz .multi&#125;</pre></td></tr><tr><td data-num="9"></td><td><pre> &#96;&#96;&#96;cpp</pre></td></tr><tr><td data-num="10"></td><td><pre> SHAPE shape1,*p1;</pre></td></tr><tr><td data-num="11"></td><td><pre> CIRCLE circle1,*q1;</pre></td></tr><tr><td data-num="12"></td><td><pre> &#96;&#96;&#96;</pre></td></tr><tr><td data-num="13"></td><td><pre> 下列哪些项是 “派生类对象替换基类对象”。</pre></td></tr><tr><td data-num="14"></td><td><pre> - &#96;p1&#x3D;&amp;circle1;&#96; &#123;.correct&#125;</pre></td></tr><tr><td data-num="15"></td><td><pre> - &#96;q1&#x3D;&amp;shape1;&#96;</pre></td></tr><tr><td data-num="16"></td><td><pre> - &#96;shape1&#x3D;circle1;&#96; &#123;.correct&#125;</pre></td></tr><tr><td data-num="17"></td><td><pre> - &#96;circle1&#x3D;shape1;&#96;</pre></td></tr><tr><td data-num="18"></td><td><pre>&#123;.options&#125;</pre></td></tr><tr><td data-num="19"></td><td><pre> &gt; - :heavy_check_mark: 令基类对象的指针指向派生类对象</pre></td></tr><tr><td data-num="20"></td><td><pre> &gt; - :x: 派生类指针指向基类的引用</pre></td></tr><tr><td data-num="21"></td><td><pre> &gt; - :heavy_check_mark: 派生类对象给基类对象赋值</pre></td></tr><tr><td data-num="22"></td><td><pre> &gt; - :x: 基类对象给派生类对象赋值</pre></td></tr><tr><td data-num="23"></td><td><pre> &gt; &#123;.options&#125;</pre></td></tr><tr><td data-num="24"></td><td><pre></pre></td></tr><tr><td data-num="25"></td><td><pre>3. 下列叙述正确的是 []&#123;.gap&#125; 。 &#123;.quiz&#125;</pre></td></tr><tr><td data-num="26"></td><td><pre> - 虚函数只能定义成无参函数</pre></td></tr><tr><td data-num="27"></td><td><pre> - 虚函数不能有返回值</pre></td></tr><tr><td data-num="28"></td><td><pre> - 能定义虚构造函数</pre></td></tr><tr><td data-num="29"></td><td><pre> - A、B、C 都不对 &#123;.correct&#125;</pre></td></tr><tr><td data-num="30"></td><td><pre>&#123;.options&#125;</pre></td></tr><tr><td data-num="31"></td><td><pre></pre></td></tr><tr><td data-num="32"></td><td><pre>10. 如果定义 &#96;int e&#x3D;8; double f&#x3D;6.4, g&#x3D;8.9;&#96;,则表达式 &#96;f+int (e&#x2F;3*int (f+g)&#x2F;2)%4&#96; 的值为 [9.4]&#123;.gap&#125;。 &#123;.quiz .fill&#125;</pre></td></tr><tr><td data-num="33"></td><td><pre> &gt; 注意运算顺序和数据类型</pre></td></tr><tr><td data-num="34"></td><td><pre> &gt; [8.4]&#123;.mistake&#125;</pre></td></tr></table></figure><p>点击选项可以显示答案,以及答案解析。</p>
<ol>
<li class="quiz">
<p>下列叙述正确的是 <span class="gap"></span> 。</p>
<ul class="options">
<li>虚函数只能定义成无参函数</li>
<li>虚函数不能有返回值</li>
<li>能定义虚构造函数</li>
<li class="correct">A、B、C 都不对</li>
</ul>
</li>
<li class="quiz multi">
<p>有基类 <code>SHAPE</code> ,派生类 <code>CIRCLE</code> ,声明如下变量: </p>
<figure class="highlight cpp"><figcaption data-lang="C++"></figcaption><table><tr><td data-num="1"></td><td><pre>SHAPE shape1<span class="token punctuation">,</span><span class="token operator">*</span>p1<span class="token punctuation">;</span></pre></td></tr><tr><td data-num="2"></td><td><pre>CIRCLE circle1<span class="token punctuation">,</span><span class="token operator">*</span>q1<span class="token punctuation">;</span></pre></td></tr></table></figure><p>下列哪些项是 “派生类对象替换基类对象”。</p>
<ul class="options">
<li class="correct"><code>p1=&amp;circle1;</code> </li>
<li><code>q1=&amp;shape1;</code></li>
<li class="correct"><code>shape1=circle1;</code> </li>
<li><code>circle1=shape1;</code></li>
</ul>
<blockquote>
<ul class="options">
<li>✔️ 令基类对象的指针指向派生类对象</li>
<li>❌ 派生类指针指向基类的引用</li>
<li>✔️ 派生类对象给基类对象赋值</li>
<li>❌ 基类对象给派生类对象赋值</li>
</ul>
</blockquote>
</li>
<li class="quiz true">
<p>编译时多态主要指运算符重载与函数重载,而运行时多态主要指虚函数。</p>
</li>
<li class="quiz fill">
<p>如果定义 <code>int e=8; double f=6.4, g=8.9;</code> ,则表达式 <code>f+int(e/3*int(f+g)/2)%4</code> 的值为 <span class="gap">9.4</span>。</p>
<blockquote>
<p>注意运算顺序和数据类型<br />
<span class="mistake"> 8.4</span></p>
</blockquote>
</li>
</ol>
<h2 id="使用说明"><a class="anchor" href="#使用说明">#</a> 使用说明</h2>
<p>本功能基于 <code>markdown-it-bracketed-spans</code> 和 <code>markdown-it-attrs</code></p>
<table>
<thead>
<tr>
<th>标签</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&#123;.quiz&#125;</code></td>
<td>选择题</td>
</tr>
<tr>
<td><code>&#123;.quiz .multi&#125;</code></td>
<td>多选题</td>
</tr>
<tr>
<td><code>&#123;.quiz .true&#125;</code></td>
<td>正确的判断题</td>
</tr>
<tr>
<td><code>&#123;.quiz .false&#125;</code></td>
<td>错误的判断题</td>
</tr>
<tr>
<td><code>&#123;.quiz .fill&#125;</code></td>
<td>填空题</td>
</tr>
<tr>
<td><code>[]&#123;.gap&#125;</code></td>
<td>空白下划线</td>
</tr>
<tr>
<td><code>[答案内容]&#123;.gap&#125;</code></td>
<td>答案内容带下划线</td>
</tr>
<tr>
<td><code>&#123;.options&#125;</code></td>
<td>ABCDE 选项</td>
</tr>
<tr>
<td><code>&#123;.correct&#125;</code></td>
<td>选择题的正确选项</td>
</tr>
<tr>
<td><code>&gt;</code></td>
<td>答案解析</td>
</tr>
<tr>
<td><code>[8.4]&#123;.mistake&#125;</code></td>
<td>错题备注</td>
</tr>
</tbody>
</table>
<h1 id="emoji-绘文字"><a class="anchor" href="#emoji-绘文字">#</a> <code>emoji</code> 绘文字</h1>
<p>本功能基于 <code>markdown-it-emoji</code> ,所有<span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL21hcmtkb3duLWl0L21hcmtkb3duLWl0LWVtb2ppL2Jsb2IvbWFzdGVyL2xpYi9kYXRhL2Z1bGwuanNvbg==">标签参考戳此</span></p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>:kissing_heart:</pre></td></tr><tr><td data-num="2"></td><td><pre>:ring:</pre></td></tr><tr><td data-num="3"></td><td><pre>:notes:</pre></td></tr></table></figure><p>😘 💍 🎶</p>
<h1 id="effects-文字特效"><a class="anchor" href="#effects-文字特效">#</a> <code>effects</code> 文字特效</h1>
<p>本功能基于 <code>markdown-it-ins</code> 、 <code>markdown-it-bracketed-spans</code> 和 <code>markdown-it-attrs</code></p>
<blockquote>
<p>本主题风格颜色通用样式:default、primary、success、info、warning、danger</p>
</blockquote>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>++ 下划线 ++</pre></td></tr><tr><td data-num="2"></td><td><pre>++ 波浪线 ++&#123;.wavy&#125;</pre></td></tr><tr><td data-num="3"></td><td><pre>++ 着重点 ++&#123;.dot&#125;</pre></td></tr><tr><td data-num="4"></td><td><pre>++ 紫色下划线 ++&#123;.primary&#125;</pre></td></tr><tr><td data-num="5"></td><td><pre>++ 绿色波浪线 ++&#123;.wavy .success&#125;</pre></td></tr><tr><td data-num="6"></td><td><pre>++ 黄色着重点 ++&#123;.dot .warning&#125;</pre></td></tr><tr><td data-num="7"></td><td><pre>~~ 删除线~~</pre></td></tr><tr><td data-num="8"></td><td><pre>~~ 红色删除线~~&#123;.danger&#125;</pre></td></tr><tr><td data-num="9"></td><td><pre>&#x3D;&#x3D; 荧光高亮 &#x3D;&#x3D;</pre></td></tr><tr><td data-num="10"></td><td><pre>[赤橙黄绿青蓝紫]&#123;.rainbow&#125;</pre></td></tr><tr><td data-num="11"></td><td><pre>[红色]&#123;.red&#125;</pre></td></tr><tr><td data-num="12"></td><td><pre>[粉色]&#123;.pink&#125;</pre></td></tr><tr><td data-num="13"></td><td><pre>[橙色]&#123;.orange&#125;</pre></td></tr><tr><td data-num="14"></td><td><pre>[黄色]&#123;.yellow&#125;</pre></td></tr><tr><td data-num="15"></td><td><pre>[绿色]&#123;.green&#125;</pre></td></tr><tr><td data-num="16"></td><td><pre>[靛青]&#123;.aqua&#125;</pre></td></tr><tr><td data-num="17"></td><td><pre>[蓝色]&#123;.blue&#125;</pre></td></tr><tr><td data-num="18"></td><td><pre>[紫色]&#123;.purple&#125;</pre></td></tr><tr><td data-num="19"></td><td><pre>[灰色]&#123;.grey&#125;</pre></td></tr><tr><td data-num="20"></td><td><pre>快捷键 [Ctrl]&#123;.kbd&#125; + [C]&#123;.kbd .red&#125;</pre></td></tr><tr><td data-num="21"></td><td><pre>H~2~0</pre></td></tr><tr><td data-num="22"></td><td><pre>29^th^</pre></td></tr></table></figure><div class="note warning">
<p>这段代码因为自动被 pangu.js 处理了一下,加了几个空格,导致直接复制代码不能正常显示。<br />
正确的代码是 <code>++下划线++</code> <code>~~删除线~~</code> <code>==荧光高亮==</code> ,不能有空格哦。</p>
</div>
<p><ins>下划线</ins><br />
<ins class="wavy">波浪线</ins><br />
<ins class="dot">着重点</ins><br />
<ins class="primary">紫色下划线</ins><br />
<ins class="wavy success">绿色波浪线</ins><br />
<ins class="dot warning">黄色着重点</ins><br />
<s>删除线</s><br />
<s class="danger">红色删除线</s><br />
<mark>荧光高亮</mark><br />
<span class="rainbow">赤橙黄绿青蓝紫</span><br />
<span class="red">红色</span><br />
<span class="pink">粉色</span><br />
<span class="orange">橙色</span><br />
<span class="yellow">黄色</span><br />
<span class="green">绿色</span><br />
<span class="aqua">靛青</span><br />
<span class="blue">蓝色</span><br />
<span class="purple">紫色</span><br />
<span class="grey">灰色</span><br />
快捷键 <span class="kbd">Ctrl</span> + <span class="kbd red">C</span><br />
H<sub>2</sub>0<br />
29<sup>th</sup></p>
<h1 id="spoiler隐藏文字"><a class="anchor" href="#spoiler隐藏文字">#</a> <code>spoiler</code> 隐藏文字</h1>
<p>本功能基于 <code>markdown-it-spoiler</code> 和 <code>markdown-it-attrs</code></p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>!! 黑幕黑幕黑幕黑幕黑幕黑幕!!: 鼠标滑过显示内容</pre></td></tr><tr><td data-num="2"></td><td><pre>!! 模糊模糊模糊模糊模糊模糊!!&#123;.bulr&#125; : 选中文字显示内容</pre></td></tr></table></figure><p><span class="spoiler" title="你知道得太多了">黑幕黑幕黑幕黑幕黑幕黑幕</span> : 鼠标滑过显示内容<br />
<span class="spoiler bulr" title="你知道得太多了">模糊模糊模糊模糊模糊模糊</span> : 选中文字显示内容</p>
<h1 id="label-标签块"><a class="anchor" href="#label-标签块">#</a> <code>label</code> 标签块</h1>
<p>本功能基于 <code>markdown-it-bracketed-spans</code> 和 <code>markdown-it-attrs</code> <br />
有以下颜色可选</p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>[default]&#123;.label&#125;</pre></td></tr><tr><td data-num="2"></td><td><pre>[primary]&#123;.label .primary&#125;</pre></td></tr><tr><td data-num="3"></td><td><pre>[info]&#123;.label .info&#125;</pre></td></tr><tr><td data-num="4"></td><td><pre>[:heavy_check_mark:success]&#123;.label .success&#125;</pre></td></tr><tr><td data-num="5"></td><td><pre>[warning]&#123;.label .warning&#125;</pre></td></tr><tr><td data-num="6"></td><td><pre>[:broken_heart:danger]&#123;.label .danger&#125;</pre></td></tr></table></figure><p><span class="label">default</span><br />
<span class="label primary">primary</span><br />
<span class="label info">info</span><br />
<span class="label success">✔️success</span><br />
<span class="label warning">warning</span><br />
<span class="label danger">💔danger</span></p>
<h1 id="note-提醒块"><a class="anchor" href="#note-提醒块">#</a> <code>note</code> 提醒块</h1>
<p>本功能基于 <code>markdown-it-container</code> <br />
标签为:</p>
<table>
<tbody>
<tr>
<td>开始行</td>
<td><code>:::[风格颜色]</code></td>
</tr>
<tr>
<td>结束行</td>
<td><code>:::</code></td>
</tr>
</tbody>
</table>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>:::default</pre></td></tr><tr><td data-num="2"></td><td><pre>默认默认</pre></td></tr><tr><td data-num="3"></td><td><pre>:::</pre></td></tr><tr><td data-num="4"></td><td><pre></pre></td></tr><tr><td data-num="5"></td><td><pre>:::primary</pre></td></tr><tr><td data-num="6"></td><td><pre>基本基本</pre></td></tr><tr><td data-num="7"></td><td><pre>:::</pre></td></tr><tr><td data-num="8"></td><td><pre></pre></td></tr><tr><td data-num="9"></td><td><pre>:::info</pre></td></tr><tr><td data-num="10"></td><td><pre>提示提示</pre></td></tr><tr><td data-num="11"></td><td><pre>:::</pre></td></tr><tr><td data-num="12"></td><td><pre></pre></td></tr><tr><td data-num="13"></td><td><pre>:::success</pre></td></tr><tr><td data-num="14"></td><td><pre>成功成功</pre></td></tr><tr><td data-num="15"></td><td><pre>:::</pre></td></tr><tr><td data-num="16"></td><td><pre></pre></td></tr><tr><td data-num="17"></td><td><pre>:::warning</pre></td></tr><tr><td data-num="18"></td><td><pre>警告警告</pre></td></tr><tr><td data-num="19"></td><td><pre>:::</pre></td></tr><tr><td data-num="20"></td><td><pre></pre></td></tr><tr><td data-num="21"></td><td><pre>:::danger</pre></td></tr><tr><td data-num="22"></td><td><pre>危险危险</pre></td></tr><tr><td data-num="23"></td><td><pre>:::</pre></td></tr><tr><td data-num="24"></td><td><pre></pre></td></tr><tr><td data-num="25"></td><td><pre>:::danger no-icon</pre></td></tr><tr><td data-num="26"></td><td><pre>危险危险</pre></td></tr><tr><td data-num="27"></td><td><pre>:::</pre></td></tr></table></figure><div class="note default">
<p>默认默认</p>
</div>
<div class="note primary">
<p>基本基本</p>
</div>
<div class="note info">
<p>提示提示</p>
</div>
<div class="note success">
<p>成功成功</p>
</div>
<div class="note warning">
<p>警告警告</p>
</div>
<div class="note danger">
<p>危险危险</p>
</div>
<div class="note danger no-icon">
<p>没有图标</p>
</div>
<h1 id="tab标签卡"><a class="anchor" href="#tab标签卡">#</a> <code>tab</code> 标签卡</h1>
<p>本功能基于 <code>markdown-it-container</code> <br />
标签为:</p>
<table>
<tbody>
<tr>
<td>开始行</td>
<td><code>;;;[同一ID] [标签名称]</code></td>
</tr>
<tr>
<td>结束行</td>
<td><code>;;;</code></td>
</tr>
</tbody>
</table>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>;;;id1 卡片 1</pre></td></tr><tr><td data-num="2"></td><td><pre>这里是卡片 1 的内容</pre></td></tr><tr><td data-num="3"></td><td><pre>** 加粗 **</pre></td></tr><tr><td data-num="4"></td><td><pre>[success]&#123;.label .success&#125;</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre>&#123;% links %&#125;</pre></td></tr><tr><td data-num="7"></td><td><pre>- site: 優萌初華</pre></td></tr><tr><td data-num="8"></td><td><pre> owner: 霜月琉璃</pre></td></tr><tr><td data-num="9"></td><td><pre> url: https:&#x2F;&#x2F;shoka.lostyu.me</pre></td></tr><tr><td data-num="10"></td><td><pre> desc: 琉璃的医学 &amp; 编程笔记</pre></td></tr><tr><td data-num="11"></td><td><pre> image: https:&#x2F;&#x2F;cdn.jsdelivr.net&#x2F;gh&#x2F;amehime&#x2F;shoka@latest&#x2F;images&#x2F;avatar.jpg</pre></td></tr><tr><td data-num="12"></td><td><pre> color: &quot;#e9546b&quot;</pre></td></tr><tr><td data-num="13"></td><td><pre>&#123;% endlinks %&#125;</pre></td></tr><tr><td data-num="14"></td><td><pre>;;;</pre></td></tr><tr><td data-num="15"></td><td><pre></pre></td></tr><tr><td data-num="16"></td><td><pre>;;;id1 卡片 2</pre></td></tr><tr><td data-num="17"></td><td><pre>这里是卡片 2 的内容</pre></td></tr><tr><td data-num="18"></td><td><pre>:::danger</pre></td></tr><tr><td data-num="19"></td><td><pre>危险危险</pre></td></tr><tr><td data-num="20"></td><td><pre>:::</pre></td></tr><tr><td data-num="21"></td><td><pre>- 第一行</pre></td></tr><tr><td data-num="22"></td><td><pre>- 第二行</pre></td></tr><tr><td data-num="23"></td><td><pre>;;;</pre></td></tr><tr><td data-num="24"></td><td><pre></pre></td></tr><tr><td data-num="25"></td><td><pre>;;;id2 ②号标签卡片 1</pre></td></tr><tr><td data-num="26"></td><td><pre>这里是卡片 1 的内容</pre></td></tr><tr><td data-num="27"></td><td><pre>;;;</pre></td></tr><tr><td data-num="28"></td><td><pre></pre></td></tr><tr><td data-num="29"></td><td><pre>;;;id2 ②号标签卡片 2</pre></td></tr><tr><td data-num="30"></td><td><pre>这里是卡片 2 的内容</pre></td></tr><tr><td data-num="31"></td><td><pre>;;;</pre></td></tr></table></figure><div class="tab" data-id="id1" data-title="卡片1">
<p>这里是卡片 1 的内容<br />
<strong>加粗</strong><br />
<span class="label success"> success</span></p>
<p><div class="links"><div class="item" title="霜月琉璃" style="--block-color:#e9546b;"><span class="exturl image" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=" data-background-image="https://cdn.jsdelivr.net/gh/amehime/shoka@latest/images/avatar.jpg"></span>
<div class="info">
<span class="exturl title" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=">優萌初華</span>
<p class="desc">琉璃的医学 & 编程笔记</p>
</div></div></div></p>
</div>
<div class="tab" data-id="id1" data-title="卡片2">
<p>这里是卡片 2 的内容</p>
<div class="note danger">
<p>危险危险</p>
</div>
<ul>
<li>第一行</li>
<li>第二行</li>
</ul>
</div>
<div class="tab" data-id="id2" data-title="②号标签卡片1">
<p>这里是卡片 1 的内容</p>
</div>
<div class="tab" data-id="id2" data-title="②号标签卡片2">
<p>这里是卡片 2 的内容</p>
</div>
<h1 id="collapse-折叠块"><a class="anchor" href="#collapse-折叠块">#</a> <code>collapse</code> 折叠块</h1>
<p>本功能基于 <code>markdown-it-container</code> <br />
标签为:</p>
<table>
<tbody>
<tr>
<td>开始行</td>
<td><code>+++[风格颜色] [标题文字]</code></td>
</tr>
<tr>
<td>结束行</td>
<td><code>+++</code></td>
</tr>
</tbody>
</table>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>+++ 默认默认 这里是一段文字</pre></td></tr><tr><td data-num="2"></td><td><pre>++ 下划线 ++</pre></td></tr><tr><td data-num="3"></td><td><pre>+++</pre></td></tr><tr><td data-num="4"></td><td><pre></pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre>+++primary 紫色</pre></td></tr><tr><td data-num="7"></td><td><pre>:::info</pre></td></tr><tr><td data-num="8"></td><td><pre>参考信息</pre></td></tr><tr><td data-num="9"></td><td><pre>:::</pre></td></tr><tr><td data-num="10"></td><td><pre></pre></td></tr><tr><td data-num="11"></td><td><pre>- 第一行</pre></td></tr><tr><td data-num="12"></td><td><pre>- 第二行</pre></td></tr><tr><td data-num="13"></td><td><pre>+++</pre></td></tr><tr><td data-num="14"></td><td><pre></pre></td></tr><tr><td data-num="15"></td><td><pre></pre></td></tr><tr><td data-num="16"></td><td><pre>+++info 蓝色</pre></td></tr><tr><td data-num="17"></td><td><pre>;;;id3 卡片 1</pre></td></tr><tr><td data-num="18"></td><td><pre>这里是卡片 1 的内容</pre></td></tr><tr><td data-num="19"></td><td><pre>;;;</pre></td></tr><tr><td data-num="20"></td><td><pre></pre></td></tr><tr><td data-num="21"></td><td><pre>;;;id3 卡片 2</pre></td></tr><tr><td data-num="22"></td><td><pre>这里是卡片 2 的内容</pre></td></tr><tr><td data-num="23"></td><td><pre>;;;</pre></td></tr><tr><td data-num="24"></td><td><pre>+++</pre></td></tr><tr><td data-num="25"></td><td><pre></pre></td></tr><tr><td data-num="26"></td><td><pre>+++success 绿色</pre></td></tr><tr><td data-num="27"></td><td><pre>&#123;% links %&#125;</pre></td></tr><tr><td data-num="28"></td><td><pre>- site: 優萌初華</pre></td></tr><tr><td data-num="29"></td><td><pre> url: https:&#x2F;&#x2F;shoka.lostyu.me</pre></td></tr><tr><td data-num="30"></td><td><pre> color: &quot;#e9546b&quot;</pre></td></tr><tr><td data-num="31"></td><td><pre>&#123;% endlinks %&#125;</pre></td></tr><tr><td data-num="32"></td><td><pre>+++</pre></td></tr><tr><td data-num="33"></td><td><pre></pre></td></tr><tr><td data-num="34"></td><td><pre>+++warning 黄色</pre></td></tr><tr><td data-num="35"></td><td><pre>!! 警告警告警告警告警告!!&#123;.bulr&#125;</pre></td></tr><tr><td data-num="36"></td><td><pre>[label]&#123;.label .success&#125;</pre></td></tr><tr><td data-num="37"></td><td><pre>+++</pre></td></tr><tr><td data-num="38"></td><td><pre></pre></td></tr><tr><td data-num="39"></td><td><pre>+++danger 红色</pre></td></tr><tr><td data-num="40"></td><td><pre>[danger]&#123;.label .danger&#125;</pre></td></tr><tr><td data-num="41"></td><td><pre>+++</pre></td></tr></table></figure><details><summary>默认默认 这里是一段文字</summary><div>
<p><ins>下划线</ins></p>
</div></details>
<details class="primary"><summary>紫色</summary><div>
<div class="note info">
<p>参考信息</p>
</div>
<ul>
<li>第一行</li>
<li>第二行</li>
</ul>
</div></details>
<details class="info"><summary>蓝色</summary><div>
<div class="tab" data-id="id3" data-title="卡片1">
<p>这里是卡片 1 的内容<br />
<ins class="wavy">波浪线</ins></p>
</div>
<div class="tab" data-id="id3" data-title="卡片2">
<p>这里是卡片 2 的内容</p>
</div>
</div></details>
<details class="success"><summary>绿色</summary><div>
<p><div class="links"><div class="item" title="優萌初華" style="--block-color:#e9546b;"><span class="exturl image" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=" data-background-image="/images/404.png"></span>
<div class="info">
<span class="exturl title" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWU=">優萌初華</span>
<p class="desc">https://shoka.lostyu.me</p>
</div></div></div></p>
</div></details>
<details class="warning"><summary>黄色</summary><div>
<p><span class="spoiler bulr" title="你知道得太多了">警告警告警告警告警告</span><br />
<span class="label success"> label</span></p>
</div></details>
<details class="danger"><summary>红色</summary><div>
<p><span class="label danger">danger</span></p>
</div></details>
<h1 id="tasklist-待办事项"><a class="anchor" href="#tasklist-待办事项">#</a> <code>taskList</code> 待办事项</h1>
<p>本功能基于 <code>markdown-it-task-checkbox</code> 。<br />
可以利用 <code>markdown-it-attrs</code> 添加风格颜色,只可以给 <code>ul</code> 标签添加,需要新建两行。</p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>- [ ] 这是一个小叉叉</pre></td></tr><tr><td data-num="2"></td><td><pre>- [x] 这是一个红色勾勾</pre></td></tr><tr><td data-num="3"></td><td><pre></pre></td></tr><tr><td data-num="4"></td><td><pre>&#123;.danger&#125;</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre>- [ ] 未完成</pre></td></tr><tr><td data-num="7"></td><td><pre>- [x] 完成</pre></td></tr><tr><td data-num="8"></td><td><pre></pre></td></tr><tr><td data-num="9"></td><td><pre>&#123;.primary&#125;</pre></td></tr><tr><td data-num="10"></td><td><pre></pre></td></tr><tr><td data-num="11"></td><td><pre>- [ ] 未完成</pre></td></tr><tr><td data-num="12"></td><td><pre>- [x] 默认颜色</pre></td></tr></table></figure><ul class="task-list danger">
<li class="task-list-item"><input type="checkbox" id="cbx_0" disabled="true" /><label for="cbx_0"> 这是一个小叉叉</label></li>
<li class="task-list-item"><input type="checkbox" id="cbx_1" checked="true" disabled="true" /><label for="cbx_1"> 这是一个红色勾勾</label></li>
</ul>
<ul class="task-list primary">
<li class="task-list-item"><input type="checkbox" id="cbx_2" disabled="true" /><label for="cbx_2"> 未完成</label></li>
<li class="task-list-item"><input type="checkbox" id="cbx_3" checked="true" disabled="true" /><label for="cbx_3"> 完成</label></li>
</ul>
<ul class="task-list">
<li class="task-list-item"><input type="checkbox" id="cbx_4" disabled="true" /><label for="cbx_4"> 未完成</label></li>
<li class="task-list-item"><input type="checkbox" id="cbx_5" checked="true" disabled="true" /><label for="cbx_5"> 默认颜色</label></li>
</ul>
<h1 id="furigana文字注音"><a class="anchor" href="#furigana文字注音">#</a> <code>furigana</code> 文字注音</h1>
<p>原本用于日语汉字假名注音,但别的注音也可以。<br />
为了兼容性,采用 <code>markdown-it-ruby</code> 的基本格式: <code>&#123;文字^注音&#125;</code> ,并且为了兼容表格,将分隔符由 <code>|</code> 换成了 <code>^</code> 。<br />
注音分隔基于 <code>furigana-markdown-it</code> <span class="exturl" data-url="aHR0cHM6Ly93d3cubnBtanMuY29tL3BhY2thZ2UvZnVyaWdhbmEtbWFya2Rvd24taXQjcXVpY2stdXNhZ2U="> 显示说明看这里</span></p>
<table>
<tbody>
<tr>
<td><code>&#123;取り返す^とりかえす&#125;</code></td>
<td><ruby>取<rp> (</rp><rt>と</rt><rp>)</rp> り<rt></rt>返<rp> (</rp><rt>かえ</rt><rp>)</rp> す<rt></rt></ruby></td>
</tr>
<tr>
<td><code>&#123;可愛い犬^か+わい・い・いぬ&#125;</code></td>
<td><ruby>可愛<rp> (</rp><rt>かわい</rt><rp>)</rp> い<rt></rt>犬<rp> (</rp><rt>いぬ</rt><rp>)</rp></ruby></td>
</tr>
<tr>
<td><code>&#123;可愛い犬^か・わい・いいぬ&#125;</code></td>
<td><ruby>可<rp> (</rp><rt>か</rt><rp>)</rp> 愛<rp> (</rp><rt>わい</rt><rp>)</rp> い<rt></rt>犬<rp> (</rp><rt>いぬ</rt><rp>)</rp></ruby></td>
</tr>
<tr>
<td><code>&#123;アクセラレータ^accelerator&#125;</code></td>
<td><ruby>アクセラレータ<rp> (</rp><rt>accelerator</rt><rp>)</rp></ruby></td>
</tr>
<tr>
<td><code>&#123;accelerator^アクセラレータ&#125;</code></td>
<td><ruby>accelerator<rp>(</rp><rt>アクセラレータ</rt><rp>)</rp></ruby></td>
</tr>
<tr>
<td><code>&#123;食べる^たべる&#125;</code></td>
<td><ruby>食<rp> (</rp><rt>た</rt><rp>)</rp> べる<rt></rt></ruby></td>
</tr>
<tr>
<td><code>&#123;食べる^=たべる&#125;</code></td>
<td><ruby>食べる<rp> (</rp><rt>たべる</rt><rp>)</rp></ruby></td>
</tr>
<tr>
<td><code>&#123;あいうえお^*&#125;</code></td>
<td><ruby>あ<rt>●</rt>い<rt>●</rt>う<rt>●</rt>え<rt>●</rt>お<rt>●</rt></ruby></td>
</tr>
<tr>
<td><code>&#123;あいうえお^*❤&#125;</code></td>
<td><ruby>あ<rt>❤</rt>い<rt>❤</rt>う<rt>❤</rt>え<rt>❤</rt>お<rt>❤</rt></ruby></td>
</tr>
<tr>
<td><code>&#123;常用账号^contact&#125;</code></td>
<td><ruby>常用账号<rp> (</rp><rt>contact</rt><rp>)</rp></ruby></td>
</tr>
</tbody>
</table>
<h1 id="media多媒体"><a class="anchor" href="#media多媒体">#</a> <code>media</code> 多媒体</h1>
<p>本功能基于 Hexo Tag 功能,使用 <code>media</code> 标签,目前可选择两种类型,即 <code>audio</code> 和 <code>video</code> 。</p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>&#123;% media audio %&#125;</pre></td></tr><tr><td data-num="2"></td><td><pre>... 音频列表</pre></td></tr><tr><td data-num="3"></td><td><pre>&#123;% endmedia %&#125;</pre></td></tr><tr><td data-num="4"></td><td><pre></pre></td></tr><tr><td data-num="5"></td><td><pre>&#123;% media video %&#125;</pre></td></tr><tr><td data-num="6"></td><td><pre>... 视频列表</pre></td></tr><tr><td data-num="7"></td><td><pre>&#123;% endmedia %&#125;</pre></td></tr></table></figure><p>标签包绕一段 <code>yml</code> 格式的内容,格式与<a href="../config/#%E8%83%8C%E6%99%AF%E9%9F%B3%E4%B9%90">背景音乐</a>的配置类似。</p>
<p>亦可以直接使用网易云、虾米、QQ 音乐的播放列表、单曲。</p>
<figure class="highlight raw"><figcaption data-lang=""><span>举个栗子</span></figcaption><table><tr><td data-num="1"></td><td><pre>&#123;% media audio %&#125;</pre></td></tr><tr><td data-num="2"></td><td><pre>- title: 列表 1</pre></td></tr><tr><td data-num="3"></td><td><pre> list:</pre></td></tr><tr><td data-num="4"></td><td><pre> - https:&#x2F;&#x2F;music.163.com&#x2F;#&#x2F;playlist?id&#x3D;2943811283</pre></td></tr><tr><td data-num="5"></td><td><pre> - https:&#x2F;&#x2F;music.163.com&#x2F;#&#x2F;playlist?id&#x3D;2297706586</pre></td></tr><tr><td data-num="6"></td><td><pre>- title: 列表 2</pre></td></tr><tr><td data-num="7"></td><td><pre> list:</pre></td></tr><tr><td data-num="8"></td><td><pre> - https:&#x2F;&#x2F;music.163.com&#x2F;#&#x2F;playlist?id&#x3D;2031842656</pre></td></tr><tr><td data-num="9"></td><td><pre>&#123;% endmedia %&#125;</pre></td></tr><tr><td data-num="10"></td><td><pre></pre></td></tr><tr><td data-num="11"></td><td><pre></pre></td></tr><tr><td data-num="12"></td><td><pre>&#123;% media video %&#125;</pre></td></tr><tr><td data-num="13"></td><td><pre>- name: &quot;测试 1&quot;</pre></td></tr><tr><td data-num="14"></td><td><pre> url: https:&#x2F;&#x2F;cdn.kastatic.org&#x2F;ka-youtube-converted&#x2F;O_nY1TM2RZM.mp4&#x2F;O_nY1TM2RZM.mp4#t&#x3D;0</pre></td></tr><tr><td data-num="15"></td><td><pre>- name: &quot;测试 2&quot;</pre></td></tr><tr><td data-num="16"></td><td><pre> url: https:&#x2F;&#x2F;cdn.kastatic.org&#x2F;ka-youtube-converted&#x2F;O_nY1TM2RZM.mp4&#x2F;O_nY1TM2RZM.mp4#t&#x3D;0</pre></td></tr><tr><td data-num="17"></td><td><pre>&#123;% endmedia %&#125;</pre></td></tr></table></figure><p><div class="media-container"><div class="player" data-type="audio" data-src='[{"title":"列表1","list":["https://music.163.com/#/playlist?id=2943811283","https://music.163.com/#/playlist?id=2297706586"]},{"title":"列表2","list":["https://music.163.com/#/playlist?id=2031842656"]}]'></div></div></p>
<p><div class="media-container"><div class="player" data-type="video" data-src='[{"name":"测试1","url":"https://cdn.kastatic.org/ka-youtube-converted/O_nY1TM2RZM.mp4/O_nY1TM2RZM.mp4#t=0"},{"name":"测试2","url":"https://cdn.kastatic.org/ka-youtube-converted/O_nY1TM2RZM.mp4/O_nY1TM2RZM.mp4#t=0"}]'></div></div></p>
<h1 id="math数学公式"><a class="anchor" href="#math数学公式">#</a> <code>math</code> 数学公式</h1>
<p>本功能基于 <code>markdown-it-katex</code> <br />
在 Front Matter 中添加 <code>math: true</code> 以支持<span class="exturl" data-url="aHR0cHM6Ly9rYXRleC5vcmcv"> KaTex</span></p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>---</pre></td></tr><tr><td data-num="2"></td><td><pre>title: 数学公式显示</pre></td></tr><tr><td data-num="3"></td><td><pre>math: true</pre></td></tr><tr><td data-num="4"></td><td><pre>---</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre>行内公式:$\sqrt &#123;3x-1&#125;+(1+x)^2$</pre></td></tr><tr><td data-num="7"></td><td><pre></pre></td></tr><tr><td data-num="8"></td><td><pre>独立块显示:</pre></td></tr><tr><td data-num="9"></td><td><pre>$$\begin &#123;array&#125;&#123;c&#125;</pre></td></tr><tr><td data-num="10"></td><td><pre></pre></td></tr><tr><td data-num="11"></td><td><pre>\nabla \times \vec &#123;\mathbf &#123;B&#125;&#125; -\, \frac1c\, \frac &#123;\partial\vec &#123;\mathbf &#123;E&#125;&#125;&#125;&#123;\partial t&#125; &amp;</pre></td></tr><tr><td data-num="12"></td><td><pre>&#x3D; \frac &#123;4\pi&#125;&#123;c&#125;\vec &#123;\mathbf &#123;j&#125;&#125; \nabla \cdot \vec &#123;\mathbf &#123;E&#125;&#125; &amp; &#x3D; 4 \pi \rho \\</pre></td></tr><tr><td data-num="13"></td><td><pre></pre></td></tr><tr><td data-num="14"></td><td><pre>\nabla \times \vec &#123;\mathbf &#123;E&#125;&#125;\, +\, \frac1c\, \frac &#123;\partial\vec &#123;\mathbf &#123;B&#125;&#125;&#125;&#123;\partial t&#125; &amp; &#x3D; \vec &#123;\mathbf &#123;0&#125;&#125; \\</pre></td></tr><tr><td data-num="15"></td><td><pre></pre></td></tr><tr><td data-num="16"></td><td><pre>\nabla \cdot \vec &#123;\mathbf &#123;B&#125;&#125; &amp; &#x3D; 0</pre></td></tr><tr><td data-num="17"></td><td><pre></pre></td></tr><tr><td data-num="18"></td><td><pre>\end &#123;array&#125;$$</pre></td></tr></table></figure><p>行内公式:<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msqrt><mrow><mn>3</mn><mi>x</mi><mo>−</mo><mn>1</mn></mrow></msqrt><mo>+</mo><mo stretchy="false">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><msup><mo stretchy="false">)</mo><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">\sqrt{3x-1}+(1+x)^2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.04em;vertical-align:-0.17444499999999996em;"></span><span class="mord sqrt"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8655550000000001em;"><span class="svg-align" style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord" style="padding-left:0.833em;"><span class="mord">3</span><span class="mord mathnormal">x</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord">1</span></span></span><span style="top:-2.825555em;"><span class="pstrut" style="height:3em;"></span><span class="hide-tail" style="min-width:0.853em;height:1.08em;"><svg width='400em' height='1.08em' viewBox='0 0 400000 1080' preserveAspectRatio='xMinYMin slice'><path d='M95,702
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l0 -0
c5.3,-9.3,12,-14,20,-14
H400000v40H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M834 80h400000v40h-400000z'/></svg></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.17444499999999996em;"><span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span></span><span class="base"><span class="strut" style="height:1.064108em;vertical-align:-0.25em;"></span><span class="mord mathnormal">x</span><span class="mclose"><span class="mclose">)</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141079999999999em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></p>
<p>独立块显示:</p>
<p><span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mtable rowspacing="0.15999999999999992em" columnalign="center" columnspacing="1em"><mtr><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mi mathvariant="normal">∇</mi><mo>×</mo><mover accent="true"><mi mathvariant="bold">B</mi><mo>⃗</mo></mover><mo>−</mo><mtext> </mtext><mfrac><mn>1</mn><mi>c</mi></mfrac><mtext> </mtext><mfrac><mrow><mi mathvariant="normal">∂</mi><mover accent="true"><mi mathvariant="bold">E</mi><mo>⃗</mo></mover></mrow><mrow><mi mathvariant="normal">∂</mi><mi>t</mi></mrow></mfrac></mrow></mstyle></mtd><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mo>=</mo><mfrac><mrow><mn>4</mn><mi>π</mi></mrow><mi>c</mi></mfrac><mover accent="true"><mi mathvariant="bold">j</mi><mo>⃗</mo></mover><mi mathvariant="normal">∇</mi><mo>⋅</mo><mover accent="true"><mi mathvariant="bold">E</mi><mo>⃗</mo></mover></mrow></mstyle></mtd><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mo>=</mo><mn>4</mn><mi>π</mi><mi>ρ</mi></mrow></mstyle></mtd></mtr><mtr><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mi mathvariant="normal">∇</mi><mo>×</mo><mover accent="true"><mi mathvariant="bold">E</mi><mo>⃗</mo></mover><mtext> </mtext><mo>+</mo><mtext> </mtext><mfrac><mn>1</mn><mi>c</mi></mfrac><mtext> </mtext><mfrac><mrow><mi mathvariant="normal">∂</mi><mover accent="true"><mi mathvariant="bold">B</mi><mo>⃗</mo></mover></mrow><mrow><mi mathvariant="normal">∂</mi><mi>t</mi></mrow></mfrac></mrow></mstyle></mtd><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mo>=</mo><mover accent="true"><mn mathvariant="bold">0</mn><mo>⃗</mo></mover></mrow></mstyle></mtd></mtr><mtr><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mi mathvariant="normal">∇</mi><mo>⋅</mo><mover accent="true"><mi mathvariant="bold">B</mi><mo>⃗</mo></mover></mrow></mstyle></mtd><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mo>=</mo><mn>0</mn></mrow></mstyle></mtd></mtr></mtable><annotation encoding="application/x-tex">\begin{array}{c}
\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} &amp;
= \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} &amp; = 4 \pi \rho \\
\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} &amp; = \vec{\mathbf{0}} \\
\nabla \cdot \vec{\mathbf{B}} &amp; = 0
\end{array}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:4.1938640000000005em;vertical-align:-1.846932em;"></span><span class="mord"><span class="mtable"><span class="arraycolsep" style="width:0.5em;"></span><span class="col-align-c"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:2.3469320000000002em;"><span style="top:-4.346932000000001em;"><span class="pstrut" style="height:3.072377em;"></span><span class="mord"><span class="mord">∇</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">×</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9691099999999999em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathbf">B</span></span></span></span><span style="top:-3.25511em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.15216em;"><span class="overlay" style="height:0.714em;width:0.471em;"><svg width='0.471em' height='0.714em' style='width:0.471em' viewBox='0 0 471 714' preserveAspectRatio='xMinYMin'><path d='M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z'/></svg></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.845108em;"><span style="top:-2.6550000000000002em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">c</span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.394em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.345em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.072377em;"><span style="top:-2.6550000000000002em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight" style="margin-right:0.05556em;">∂</span><span class="mord mathnormal mtight">t</span></span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.394em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight" style="margin-right:0.05556em;">∂</span><span class="mord accent mtight"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9691099999999999em;"><span style="top:-2.714em;"><span class="pstrut" style="height:2.714em;"></span><span class="mord mtight"><span class="mord mtight"><span class="mord mathbf mtight">E</span></span></span></span><span style="top:-2.96911em;"><span class="pstrut" style="height:2.714em;"></span><span class="accent-body" style="left:-0.15216em;"><span class="overlay mtight" style="height:0.714em;width:0.471em;"><svg width='0.471em' height='0.714em' style='width:0.471em' viewBox='0 0 471 714' preserveAspectRatio='xMinYMin'><path d='M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z'/></svg></span></span></span></span></span></span></span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.345em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span></span></span><span style="top:-2.9145549999999996em;"><span class="pstrut" style="height:3.072377em;"></span><span class="mord"><span class="mord">∇</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">×</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9691099999999999em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathbf">E</span></span></span></span><span style="top:-3.25511em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.15216em;"><span class="overlay" style="height:0.714em;width:0.471em;"><svg width='0.471em' height='0.714em' style='width:0.471em' viewBox='0 0 471 714' preserveAspectRatio='xMinYMin'><path d='M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z'/></svg></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.845108em;"><span style="top:-2.6550000000000002em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">c</span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.394em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.345em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.072377em;"><span style="top:-2.6550000000000002em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight" style="margin-right:0.05556em;">∂</span><span class="mord mathnormal mtight">t</span></span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.394em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight" style="margin-right:0.05556em;">∂</span><span class="mord accent mtight"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9691099999999999em;"><span style="top:-2.714em;"><span class="pstrut" style="height:2.714em;"></span><span class="mord mtight"><span class="mord mtight"><span class="mord mathbf mtight">B</span></span></span></span><span style="top:-2.96911em;"><span class="pstrut" style="height:2.714em;"></span><span class="accent-body" style="left:-0.15216em;"><span class="overlay mtight" style="height:0.714em;width:0.471em;"><svg width='0.471em' height='0.714em' style='width:0.471em' viewBox='0 0 471 714' preserveAspectRatio='xMinYMin'><path d='M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z'/></svg></span></span></span></span></span></span></span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.345em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span></span></span><span style="top:-1.585445em;"><span class="pstrut" style="height:3.072377em;"></span><span class="mord"><span class="mord">∇</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">⋅</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9691099999999999em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathbf">B</span></span></span></span><span style="top:-3.25511em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.15216em;"><span class="overlay" style="height:0.714em;width:0.471em;"><svg width='0.471em' height='0.714em' style='width:0.471em' viewBox='0 0 471 714' preserveAspectRatio='xMinYMin'><path d='M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z'/></svg></span></span></span></span></span></span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:1.846932em;"><span></span></span></span></span></span><span class="arraycolsep" style="width:0.5em;"></span><span class="arraycolsep" style="width:0.5em;"></span><span class="col-align-c"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:2.3469320000000002em;"><span style="top:-4.346932000000001em;"><span class="pstrut" style="height:3.072377em;"></span><span class="mord"><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.845108em;"><span style="top:-2.6550000000000002em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">c</span></span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.394em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">4</span><span class="mord mathnormal mtight" style="margin-right:0.03588em;">π</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.345em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mord accent"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.9774399999999999em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathbf">j</span></span></span></span><span style="top:-3.26344em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2355em;"><span class="overlay" style="height:0.714em;width:0.471em;"><svg width='0.471em' height='0.714em' style='width:0.471em' viewBox='0 0 471 714' preserveAspectRatio='xMinYMin'><path d='M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z'/></svg></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.19444em;"><span></span></span></span></span></span><span class="mord">∇</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">⋅</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.9691099999999999em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathbf">E</span></span></span></span><span style="top:-3.25511em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.15216em;"><span class="overlay" style="height:0.714em;width:0.471em;"><svg width='0.471em' height='0.714em' style='width:0.471em' viewBox='0 0 471 714' preserveAspectRatio='xMinYMin'><path d='M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z'/></svg></span></span></span></span></span></span></span></span></span><span style="top:-2.9145549999999996em;"><span class="pstrut" style="height:3.072377em;"></span><span class="mord"><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.92744em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathbf">0</span></span></span></span><span style="top:-3.21344em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2355em;"><span class="overlay" style="height:0.714em;width:0.471em;"><svg width='0.471em' height='0.714em' style='width:0.471em' viewBox='0 0 471 714' preserveAspectRatio='xMinYMin'><path d='M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z'/></svg></span></span></span></span></span></span></span></span></span><span style="top:-1.585445em;"><span class="pstrut" style="height:3.072377em;"></span><span class="mord"><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mord">0</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:1.846932em;"><span></span></span></span></span></span><span class="arraycolsep" style="width:0.5em;"></span><span class="arraycolsep" style="width:0.5em;"></span><span class="col-align-c"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:2.3469320000000002em;"><span style="top:-4.346932000000001em;"><span class="pstrut" style="height:3.072377em;"></span><span class="mord"><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mord">4</span><span class="mord mathnormal" style="margin-right:0.03588em;">π</span><span class="mord mathnormal">ρ</span></span></span></span></span></span></span><span class="arraycolsep" style="width:0.5em;"></span></span></span></span></span></span></span></p>
<h1 id="mermaid流程图"><a class="anchor" href="#mermaid流程图">#</a> <code>mermaid</code> 流程图</h1>
<p>本功能基于 <code>markdown-it-mermaid</code> <br />
在 Front Matter 中添加 <code>mermaid: true</code> 以支持<span class="exturl" data-url="aHR0cHM6Ly9tZXJtYWlkLWpzLmdpdGh1Yi5pby9tZXJtYWlkLyMv"> Mermaid</span></p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>---</pre></td></tr><tr><td data-num="2"></td><td><pre>title: 流程图显示</pre></td></tr><tr><td data-num="3"></td><td><pre>mermaid: true</pre></td></tr><tr><td data-num="4"></td><td><pre>---</pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre>&#96;&#96;&#96;mermaid</pre></td></tr><tr><td data-num="7"></td><td><pre>graph LR</pre></td></tr><tr><td data-num="8"></td><td><pre> A [Square Rect] -- Link text --&gt; B ((Circle))</pre></td></tr><tr><td data-num="9"></td><td><pre> A --&gt; C (Round Rect)</pre></td></tr><tr><td data-num="10"></td><td><pre> B --&gt; D &#123;Rhombus&#125;</pre></td></tr><tr><td data-num="11"></td><td><pre> C --&gt; D</pre></td></tr><tr><td data-num="12"></td><td><pre>&#96;&#96;&#96;</pre></td></tr><tr><td data-num="13"></td><td><pre></pre></td></tr><tr><td data-num="14"></td><td><pre>&#96;&#96;&#96;mermaid</pre></td></tr><tr><td data-num="15"></td><td><pre>sequenceDiagram</pre></td></tr><tr><td data-num="16"></td><td><pre> loop Daily query</pre></td></tr><tr><td data-num="17"></td><td><pre> Alice-&gt;&gt;Bob: Hello Bob, how are you?</pre></td></tr><tr><td data-num="18"></td><td><pre> alt is sick</pre></td></tr><tr><td data-num="19"></td><td><pre> Bob-&gt;&gt;Alice: Not so good :(</pre></td></tr><tr><td data-num="20"></td><td><pre> else is well</pre></td></tr><tr><td data-num="21"></td><td><pre> Bob-&gt;&gt;Alice: Feeling fresh like a daisy</pre></td></tr><tr><td data-num="22"></td><td><pre> end</pre></td></tr><tr><td data-num="23"></td><td><pre></pre></td></tr><tr><td data-num="24"></td><td><pre> opt Extra response</pre></td></tr><tr><td data-num="25"></td><td><pre> Bob-&gt;&gt;Alice: Thanks for asking</pre></td></tr><tr><td data-num="26"></td><td><pre> end</pre></td></tr><tr><td data-num="27"></td><td><pre> end</pre></td></tr><tr><td data-num="28"></td><td><pre>&#96;&#96;&#96;</pre></td></tr></table></figure><figure class="highlight mermaid"><figcaption data-lang="mermaid"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token keyword">graph</span> LR</pre></td></tr><tr><td data-num="2"></td><td><pre> A<span class="token text string">[Square Rect]</span> <span class="token inter-arrow-label"><span class="token arrow-head arrow operator">--</span> <span class="token label property">Link text</span> <span class="token arrow operator">--></span></span> B<span class="token text string">((Circle))</span></pre></td></tr><tr><td data-num="3"></td><td><pre> A <span class="token arrow operator">--></span> C<span class="token text string">(Round Rect)</span></pre></td></tr><tr><td data-num="4"></td><td><pre> B <span class="token arrow operator">--></span> D<span class="token text string">&#123;Rhombus&#125;</span></pre></td></tr><tr><td data-num="5"></td><td><pre> C <span class="token arrow operator">--></span> D</pre></td></tr></table></figure><figure class="highlight mermaid"><figcaption data-lang="mermaid"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token keyword">sequenceDiagram</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token keyword">loop</span> Daily query</pre></td></tr><tr><td data-num="3"></td><td><pre> Alice<span class="token arrow operator">->></span>Bob<span class="token operator">:</span> Hello Bob, how are you?</pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token keyword">alt</span> is sick</pre></td></tr><tr><td data-num="5"></td><td><pre> Bob<span class="token arrow operator">->></span>Alice<span class="token operator">:</span> Not so good <span class="token operator">:</span><span class="token punctuation">(</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token keyword">else</span> is well</pre></td></tr><tr><td data-num="7"></td><td><pre> Bob<span class="token arrow operator">->></span>Alice<span class="token operator">:</span> Feeling fresh like a daisy</pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token keyword">end</span></pre></td></tr><tr><td data-num="9"></td><td><pre></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token keyword">opt</span> Extra response</pre></td></tr><tr><td data-num="11"></td><td><pre> Bob<span class="token arrow operator">->></span>Alice<span class="token operator">:</span> Thanks for asking</pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token keyword">end</span></pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token keyword">end</span></pre></td></tr></table></figure></content>
<category term="计算机科学" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/" />
<category term="二进制杂谈" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%9D%82%E8%B0%88/" />
<category term="Theme Shoka Documentation" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%9D%82%E8%B0%88/Theme-Shoka-Documentation/" />
<category term="Hexo" scheme="https://akiting01.github.io/shoka/tags/Hexo/" />
<category term="教程" scheme="https://akiting01.github.io/shoka/tags/%E6%95%99%E7%A8%8B/" />
<updated>2020-08-13T13:45:48.000Z</updated>
</entry>
<entry>
<id>https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/display/</id>
<title>Step.3 界面显示</title>
<link rel="alternate" href="https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/display/"/>
<content type="html"><div class="note primary">
<p><a href="/computer-science/note/theme-shoka-doc/">🚀快速开始</a> - <a href="/computer-science/note/theme-shoka-doc/dependents/">💌依赖插件</a> - <a href="/computer-science/note/theme-shoka-doc/config/">📌基本配置</a> - <a href="/computer-science/note/theme-shoka-doc/display/"><strong>🌈界面显示</strong></a> - <a href="/computer-science/note/theme-shoka-doc/special/">🦄特殊功能</a></p>
</div>
<h1 id="首页置顶文章"><a class="anchor" href="#首页置顶文章">#</a> 首页置顶文章</h1>
<p>在文章的 Front Matter 设置 <code>sticky: true</code> ,则该文章将显示在首页最上方的 <code>置顶文章</code> 列。<br />
多篇文章按照发布时间倒序排列,不分页。</p>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>---</pre></td></tr><tr><td data-num="2"></td><td><pre>title: 置顶文章</pre></td></tr><tr><td data-num="3"></td><td><pre>sticky: true</pre></td></tr><tr><td data-num="4"></td><td><pre>---</pre></td></tr></table></figure><h1 id="首页精选分类"><a class="anchor" href="#首页精选分类">#</a> 首页精选分类</h1>
<p>想要在首页显示分类翻转块,需要按照以下示例的方式,给需要显示的分类加上封面图。</p>
<ol>
<li>
<p>首先,修改站点配置:<br />
找到 <code>category_map:</code> ,配置每个分类对应的英文映射,比如:</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">category_map</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">计算机科学</span><span class="token punctuation">:</span> computer<span class="token punctuation">-</span>science</pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">Java</span><span class="token punctuation">:</span> java</pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">C++</span><span class="token punctuation">:</span> cpp</pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">二进制杂谈</span><span class="token punctuation">:</span> note</pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">计算机程序设计(C++)-西安交通大学</span><span class="token punctuation">:</span> course<span class="token punctuation">-</span><span class="token number">1</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">零基础学Java语言-浙江大学-翁恺</span><span class="token punctuation">:</span> course<span class="token punctuation">-</span><span class="token number">1</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">面向对象程序设计-Java语言-浙江大学-翁恺</span><span class="token punctuation">:</span> course<span class="token punctuation">-</span><span class="token number">2</span></pre></td></tr></table></figure><blockquote>
<p>注意:hexo 会自动处理路径中的特殊字符,~`!@#$%<span></span>^&amp;*()-_+=<span></span>{}|\;:&quot;'&lt;&gt;,.? 以及空格,这些全部会被替换成 <code>-</code> <br />
所以避免在设置中使用上述字符,否则可导致无法抓取到目录下的 <code>cover.jpg</code></p>
</blockquote>
</li>
<li>
<p>在 <code>&lt;root&gt;/source/_posts</code> 文件夹相应的目录里,存放封面图<br />
例子:如 <span class="exturl" data-url="aHR0cHM6Ly9zaG9rYS5sb3N0eXUubWUvY29tcHV0ZXItc2NpZW5jZS9qYXZhL2NvdXJzZS0xL3dlZWstMS8=">第 1 周 计算</span> 这篇文章。<br />
所处的分类是</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">categories</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token punctuation">-</span> <span class="token punctuation">[</span>计算机科学<span class="token punctuation">,</span> Java<span class="token punctuation">,</span> 零基础学Java语言<span class="token punctuation">-</span>浙江大学<span class="token punctuation">-</span>翁恺<span class="token punctuation">]</span></pre></td></tr></table></figure><p>现在需要在首页显示 <code>零基础学Java语言-浙江大学-翁恺</code> 这个分类,翻转卡片后,显示这个分类下的文章们。<br />
而该分类经过英文映射,它的路径将是 <code>/computer-science/java/course-1/</code> 。</p>
<p>那么,请在 <code>&lt;root&gt;/source/_posts/computer-science/java/course-1/</code> 的目录下放置 <code>cover.jpg</code> 文件。<br />
只要 <code>分类路径</code> 对应的目录下<strong>存在</strong> <code>cover.jpg</code> 文件,这个分类就会在首页显示。<br />
在进行 <code>hexo g</code> 时,本分类的封面图会自动被复制到 public 目录里相应的位置。</p>
</li>
<li>
<p>事实上,为了方便文章管理,这个分类下所有文章的 md 文件,我都会放在 <code>&lt;root&gt;/source/_posts/computer-science/java/course-1/</code> 这个目录下。</p>
<p>且站点配置文件里,永久链接设置如下</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">permalink</span><span class="token punctuation">:</span> <span class="token punctuation">:</span>title/</pre></td></tr></table></figure><p><code>hexo g</code> 后,文章的 html 文件们将全部生成到 <code>&lt;root&gt;/public/computer-science/java/course-1/</code> 目录。<br />
具体可以查看<span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2FtZWhpbWUvc2hva2E=">本博客的 github 仓库</span>。</p>
</li>
<li>
<p>文章详情界面中的 <code>系列文章</code> ,显示的是与当前文章同一分类的其他文章,并按照文章名正序排序。</p>
</li>
</ol>
<blockquote>
<p>o (* ̄▽ ̄*) ゞ<br />
其实,不设置 <code>category_map</code> 也可以,只要在分类路径对应的文件夹下存在 <code>cover.jpg</code> 文件就行。<br />
现在,这项功能与 <code>category_dir</code> 的配置也无关, <code>hexo g</code> 生成后,图片会自动被转移到 <code>category_dir</code> 的相关子目录下。</p>
</blockquote>
<h1 id="文章封面图"><a class="anchor" href="#文章封面图">#</a> 文章封面图</h1>
<ul>
<li>
<p>如果文章的 Front Matter 设置了 <code>cover: image path</code> ,则封面会显示这张图片。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"><span>举个栗子</span></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">title</span><span class="token punctuation">:</span> Images</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">cover</span><span class="token punctuation">:</span> assets/wallpaper<span class="token punctuation">-</span>2572384.jpg</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token comment"># 或者写成</span></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token key atrule">cover</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//placehold.it/350x150.jpg</pre></td></tr><tr><td data-num="5"></td><td><pre><span class="token punctuation">---</span></pre></td></tr></table></figure><p>这里 <code>cover</code> 的值可以是位于 <code>source</code> 目录里的图片文件,此处是 <code>&lt;root&gt;/source/assets/wallpaper-2572384.jpg</code> 文件,也可以是一个某网址。</p>
</li>
<li>
<p>如果文章是一个 <code>gallery post</code> ,即 Front Matter 设置了 <code>photos</code> ,则会封面会显示设置的第一张图片。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"><span>举个栗子</span></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">title</span><span class="token punctuation">:</span> Gallery Post</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">photos</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token punctuation">-</span> assets/wallpaper<span class="token punctuation">-</span>2572384.jpg</pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token punctuation">-</span> assets/wallpaper<span class="token punctuation">-</span>2311325.jpg</pre></td></tr><tr><td data-num="5"></td><td><pre><span class="token punctuation">-</span> assets/wallpaper<span class="token punctuation">-</span>878514.jpg</pre></td></tr><tr><td data-num="6"></td><td><pre><span class="token punctuation">-</span> http<span class="token punctuation">:</span>//placehold.it/350x150.jpg</pre></td></tr><tr><td data-num="7"></td><td><pre><span class="token punctuation">---</span></pre></td></tr></table></figure><p>此时默认会显示第一个图片,即位于 <code>&lt;root&gt;/source/assets/</code> 目录里的 <code>wallpaper-2572384.jpg</code> 。</p>
</li>
<li>
<p>如果站点配置中设置了 <code>post_asset_folder: true</code> ,那么上述本地图片路径应为 <code>&lt;root&gt;/source/_posts/文章同名的文件夹/assets/wallpaper-2572384.jpg</code> ,当然此时 <code>assets</code> 目录可以省掉。</p>
</li>
<li>
<p>如果以上设置均不存在,将显示一张随机图片,<a href="../config/#%E9%9A%8F%E6%9C%BA%E5%9B%BE%E5%BA%93">随机图库配置戳此</a>。</p>
</li>
</ul>
<h1 id="图片展示与相册"><a class="anchor" href="#图片展示与相册">#</a> 图片展示与相册</h1>
<p>在文章的 Front Matter 设置 <code>fancybox: false</code> ,可以关闭文章页的图片展示功能。<br />
使用<span class="exturl" data-url="aHR0cDovL21pcm9tYW5uaW5vLmdpdGh1Yi5pby9KdXN0aWZpZWQtR2FsbGVyeS8="> Justified-Gallery</span> 对 Gallery Post 内图案进行排列。</p>
<p>下面介绍一些小技巧:</p>
<ol>
<li>让图案下方显示 <code>title</code> 的 markdown 代码</li>
</ol>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>![这里是 alt](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1gicis081o9j20zk0m8dmr.jpg &quot;这里是 title&quot;)</pre></td></tr></table></figure><p><img data-src="https://tva3.sinaimg.cn/large/6833939bly1gicis081o9j20zk0m8dmr.jpg" alt="这里是alt" title="这里是title" /></p>
<ol start="2">
<li>设置图片的大小</li>
</ol>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1gicis081o9j20zk0m8dmr.jpg &quot;定义图片大小 - 固定宽度和高度&quot;)&#123;height&#x3D;&quot;100px&quot; width&#x3D;&quot;400px&quot;&#125;</pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1gicis081o9j20zk0m8dmr.jpg &quot;定义图片大小 - 固定宽度&quot;)&#123;width&#x3D;&quot;400px&quot;&#125;</pre></td></tr><tr><td data-num="4"></td><td><pre></pre></td></tr><tr><td data-num="5"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1gicis081o9j20zk0m8dmr.jpg &quot;定义图片大小 - 固定高度&quot;)&#123;height&#x3D;&quot;100px&quot;&#125;</pre></td></tr></table></figure><p><img data-src="https://tva3.sinaimg.cn/large/6833939bly1gicis081o9j20zk0m8dmr.jpg" alt="" title="定义图片大小-固定宽度和高度" height="100px" width="400px" /></p>
<p><img data-src="https://tva3.sinaimg.cn/large/6833939bly1gicis081o9j20zk0m8dmr.jpg" alt="" title="定义图片大小-固定宽度" width="400px" /></p>
<p><img data-src="https://tva3.sinaimg.cn/large/6833939bly1gicis081o9j20zk0m8dmr.jpg" alt="" title="定义图片大小-固定高度" height="100px" /></p>
<ol start="3">
<li>除了在 Front Matter 里配置 <code>photos</code> 可以显示相册图案列表外,还可以这样写</li>
</ol>
<figure class="highlight raw"><figcaption data-lang=""></figcaption><table><tr><td data-num="1"></td><td><pre>## 图案列表 No.1</pre></td></tr><tr><td data-num="2"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1giclfdu6exj20zk0m87hw.jpg &quot;这里是 title&quot;)</pre></td></tr><tr><td data-num="3"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1giclflwv2aj20zk0m84qp.jpg)</pre></td></tr><tr><td data-num="4"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1giclg5ms2rj20zk0m8u0x.jpg)</pre></td></tr><tr><td data-num="5"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1giclhnx9glj20zk0m8npd.jpg)</pre></td></tr><tr><td data-num="6"></td><td><pre>&#123;.gallery&#125;</pre></td></tr><tr><td data-num="7"></td><td><pre></pre></td></tr><tr><td data-num="8"></td><td><pre>## 图案列表 No.2</pre></td></tr><tr><td data-num="9"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1gicitht3xtj20zk0m8k5v.jpg)</pre></td></tr><tr><td data-num="10"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1giclil3m4ej20zk0m8tn8.jpg)</pre></td></tr><tr><td data-num="11"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1gicljgocqbj20zk0m8e81.jpg)</pre></td></tr><tr><td data-num="12"></td><td><pre>![](https:&#x2F;&#x2F;tva3.sinaimg.cn&#x2F;large&#x2F;6833939bly1gipetfk5zwj20zk0m8e81.jpg)</pre></td></tr><tr><td data-num="13"></td><td><pre>&#123;.gallery data-height&#x3D;&quot;120&quot;&#125;</pre></td></tr></table></figure><p><code>data-height</code> 用来设置每行的高度,默认为 <code>220</code></p>
<h2 id="图案列表no1"><a class="anchor" href="#图案列表no1">#</a> 图案列表 No.1</h2>
<p class="gallery"><img data-src="https://tva3.sinaimg.cn/large/6833939bly1giclfdu6exj20zk0m87hw.jpg" alt="" title="这里是title" /><br />
<img data-src="https://tva3.sinaimg.cn/large/6833939bly1giclflwv2aj20zk0m84qp.jpg" alt="" /><br />
<img data-src="https://tva3.sinaimg.cn/large/6833939bly1giclg5ms2rj20zk0m8u0x.jpg" alt="" /><br />
<img data-src="https://tva3.sinaimg.cn/large/6833939bly1giclhnx9glj20zk0m8npd.jpg" alt="" /></p>
<h2 id="图案列表no2"><a class="anchor" href="#图案列表no2">#</a> 图案列表 No.2</h2>
<p class="gallery" data-height="120"><img data-src="https://tva3.sinaimg.cn/large/6833939bly1gicitht3xtj20zk0m8k5v.jpg" alt="" /><br />
<img data-src="https://tva3.sinaimg.cn/large/6833939bly1giclil3m4ej20zk0m8tn8.jpg" alt="" /><br />
<img data-src="https://tva3.sinaimg.cn/large/6833939bly1gicljgocqbj20zk0m8e81.jpg" alt="" /><br />
<img data-src="https://tva3.sinaimg.cn/large/6833939bly1gipetfk5zwj20zk0m8e81.jpg" alt="" /></p>
<h1 id="自定义页面配色"><a class="anchor" href="#自定义页面配色">#</a> 自定义页面配色</h1>
<p>主题配色全部在 <code>&lt;root&gt;/themes/shoka/source/css/_colors.styl</code> 文件中,可以自行查看。</p>
<p>在 <code>&lt;root&gt;/source/_data/</code> 目录新建文件 <code>colors.styl</code> ,在此文件中添改样式。</p>
<blockquote>
<p>自定义 <code>colors.styl</code> 文件将覆盖主题默认样式,为了避免出错,请保证原有样式名均存在,在原有样式基础上进行增删改。</p>
</blockquote>
<p>主题支持在 <code>&lt;root&gt;/source/_data/</code> 目录建立三个自定义 <code>styl</code> 文件:</p>
<table>
<thead>
<tr>
<th>自定义文件名</th>
<th>对应默认样式文件</th>
<th>样式功能</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>colors.styl</code></td>
<td><code>_colors.styl</code></td>
<td>页面配色</td>
</tr>
<tr>
<td><code>iconfont.styl</code></td>
<td><code>_iconfont.styl</code></td>
<td><a href="../config/#iconfont%E5%9B%BE%E6%A0%87">图标样式</a></td>
</tr>
<tr>
<td><code>custom.styl</code></td>
<td>-</td>
<td>任意自定义样式</td>
</tr>
</tbody>
</table>
<h1 id="自定义主题图片"><a class="anchor" href="#自定义主题图片">#</a> 自定义主题图片</h1>
<p>如果想要修改主题的 <code>&lt;root&gt;/themes/shoka/source/images/</code> 目录内的某张图片,请在 <code>&lt;root&gt;/source/_data/</code> 目录新建目录 <code>images</code> ,并在这个文件夹中添加<ins>同名</ins>文件,部署时将自动覆盖主题内的默认图片。</p>
<p>可以用此方法自定义头像、打赏二维码等图片,并且避免覆盖更新主题时遗失自定义文件。</p>
<h1 id="自定义语言包"><a class="anchor" href="#自定义语言包">#</a> 自定义语言包</h1>
<p>本功能参考 NexT,主要可以用来定义菜单等处显示的文字,且可以方便主题无脑覆盖升级。</p>
<p>在 <code>&lt;root&gt;/source/_data/</code> 目录新建文件 <code>languages.yml</code> 。</p>
<p>按照以下格式添加配置项:</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment"># language</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">zh-CN</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token comment"># items</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">post</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">copyright</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token comment"># the translation you perfer</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">author</span><span class="token punctuation">:</span> 本文博主</pre></td></tr><tr><td data-num="8"></td><td><pre><span class="token key atrule">en</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token key atrule">menu</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token key atrule">travellings</span><span class="token punctuation">:</span> Travellings</pre></td></tr></table></figure><p>可以参考主题目录下的 <code>example/source/_data</code> 文件夹。</p>
<blockquote>
<p>站点配置及文件的 Front Matter 中, <code>language</code> 项只支持 <code>zh-CN</code> 、 <code>zh-HK</code> 、 <code>zh-TW</code> 、 <code>ja</code> 、 <code>en</code> 。<br />
类似写成 <code>zh_CN</code> 这样是不可以的。</p>
</blockquote>
</content>
<category term="计算机科学" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/" />
<category term="二进制杂谈" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%9D%82%E8%B0%88/" />
<category term="Theme Shoka Documentation" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%9D%82%E8%B0%88/Theme-Shoka-Documentation/" />
<category term="Hexo" scheme="https://akiting01.github.io/shoka/tags/Hexo/" />
<category term="教程" scheme="https://akiting01.github.io/shoka/tags/%E6%95%99%E7%A8%8B/" />
<updated>2020-08-13T13:12:48.000Z</updated>
</entry>
<entry>
<id>https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/config/</id>
<title>Step.2 基本配置</title>
<link rel="alternate" href="https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/config/"/>
<content type="html"><div class="note primary">
<p><a href="/computer-science/note/theme-shoka-doc/">🚀快速开始</a> - <a href="/computer-science/note/theme-shoka-doc/dependents/">💌依赖插件</a> - <a href="/computer-science/note/theme-shoka-doc/config/"><strong>📌基本配置</strong></a> - <a href="/computer-science/note/theme-shoka-doc/display/">🌈界面显示</a> - <a href="/computer-science/note/theme-shoka-doc/special/">🦄特殊功能</a></p>
</div>
<h1 id="站点别称"><a class="anchor" href="#站点别称">#</a> 站点别称</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">alternate</span><span class="token punctuation">:</span> Yume Shoka</pre></td></tr></table></figure><p>这里设置的名称代替 Logo,显示在页面顶部,以及页尾©️处</p>
<h1 id="静态文件目录"><a class="anchor" href="#静态文件目录">#</a> 静态文件目录</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">statics</span><span class="token punctuation">:</span> / <span class="token comment">#//cdn.jsdelivr.net/gh/amehime/shoka@latest/</span></pre></td></tr></table></figure><p>默认值是 <code>/</code> ,指使用本地静态文件<br />
可以修改成 <code>//cdn.jsdelivr.net/gh/您的github用户名/您的项目名@latest/</code> 这种形式,以使用 jsDelivr 进行加速。<br />
PS:jsDelivr 并不是实时更新,重新生成文件后需要耐心等待</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">css</span><span class="token punctuation">:</span> css</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">js</span><span class="token punctuation">:</span> js</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">images</span><span class="token punctuation">:</span> images</pre></td></tr></table></figure><p>静态文件所处目录的实际目录名,这些一般不改。</p>
<h1 id="夜间模式"><a class="anchor" href="#夜间模式">#</a> 夜间模式</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">darkmode</span><span class="token punctuation">:</span> <span class="token comment"># true</span></pre></td></tr></table></figure><p>默认情况下,是否开启夜间模式取决于(优先级从高到低):</p>
<ol>
<li>访客点击页面头部切换按钮的自行选择</li>
<li>访客切换了浏览设备的主题色调</li>
<li>您的 <code>darkmode</code> 配置项</li>
</ol>
<h1 id="自动定位"><a class="anchor" href="#自动定位">#</a> 自动定位</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">auto_scroll</span><span class="token punctuation">:</span> <span class="token comment"># false</span></pre></td></tr></table></figure><p>默认情况下,再次打开页面时,会自动滚动到上次浏览的位置。<br />
这个选项设为 <code>false</code> 时将停用此功能。</p>
<h1 id="加载动画"><a class="anchor" href="#加载动画">#</a> 加载动画</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment"># 是否显示页面加载动画 loading-cat</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">loader</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">start</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 当初次打开页面时,显示加载动画</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">switch</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># tab 切换到其他页面时,显示加载动画</span></pre></td></tr></table></figure><p>tab 切换后只是显示 loading 动画,实际并未重新加载页面</p>
<h1 id="页面特效"><a class="anchor" href="#页面特效">#</a> 页面特效</h1>
<p>单击页面的烟花效果配置如下</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">fireworks</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 是否启用</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">color</span><span class="token punctuation">:</span> <span class="token comment"># 烟花颜色</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">"rgba(255,182,185,.9)"</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">"rgba(250,227,217,.9)"</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">"rgba(187,222,214,.9)"</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">"rgba(138,198,209,.9)"</span></pre></td></tr></table></figure><h1 id="加载谷歌字体"><a class="anchor" href="#加载谷歌字体">#</a> 加载谷歌字体</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">font</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token comment"># Font options:</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token comment"># `external: true` will load this font family from `host` above.</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token comment"># `family: Times New Roman`. Without any quotes.</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token comment"># `size: x.x`. Use `em` as unit. Default: 1 (16px)</span></pre></td></tr><tr><td data-num="7"></td><td><pre></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token comment"># Global font settings used for all elements inside &lt;body>.</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token key atrule">global</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token key atrule">external</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token key atrule">family</span><span class="token punctuation">:</span> Mulish</pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token key atrule">size</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="13"></td><td><pre></pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token comment"># Font settings for alternate title.</span></pre></td></tr><tr><td data-num="15"></td><td><pre> <span class="token key atrule">logo</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="16"></td><td><pre> <span class="token key atrule">external</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="17"></td><td><pre> <span class="token key atrule">family</span><span class="token punctuation">:</span> Fredericka the Great</pre></td></tr><tr><td data-num="18"></td><td><pre> <span class="token key atrule">size</span><span class="token punctuation">:</span> <span class="token number">3.5</span></pre></td></tr><tr><td data-num="19"></td><td><pre></pre></td></tr><tr><td data-num="20"></td><td><pre> <span class="token comment"># Font settings for site title.</span></pre></td></tr><tr><td data-num="21"></td><td><pre> <span class="token key atrule">title</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="22"></td><td><pre> <span class="token key atrule">external</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="23"></td><td><pre> <span class="token key atrule">family</span><span class="token punctuation">:</span> Noto Serif JP</pre></td></tr><tr><td data-num="24"></td><td><pre> <span class="token key atrule">size</span><span class="token punctuation">:</span> <span class="token number">2.5</span></pre></td></tr><tr><td data-num="25"></td><td><pre></pre></td></tr><tr><td data-num="26"></td><td><pre> <span class="token comment"># Font settings for headlines (&lt;h1> to &lt;h6>).</span></pre></td></tr><tr><td data-num="27"></td><td><pre> <span class="token key atrule">headings</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="28"></td><td><pre> <span class="token key atrule">external</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="29"></td><td><pre> <span class="token key atrule">family</span><span class="token punctuation">:</span> Noto Serif SC</pre></td></tr><tr><td data-num="30"></td><td><pre> <span class="token key atrule">size</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="31"></td><td><pre></pre></td></tr><tr><td data-num="32"></td><td><pre> <span class="token comment"># Font settings for posts.</span></pre></td></tr><tr><td data-num="33"></td><td><pre> <span class="token key atrule">posts</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="34"></td><td><pre> <span class="token key atrule">external</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="35"></td><td><pre> <span class="token key atrule">family</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="36"></td><td><pre></pre></td></tr><tr><td data-num="37"></td><td><pre> <span class="token comment"># Font settings for &lt;code> and code blocks.</span></pre></td></tr><tr><td data-num="38"></td><td><pre> <span class="token key atrule">codes</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="39"></td><td><pre> <span class="token key atrule">external</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="40"></td><td><pre> <span class="token key atrule">family</span><span class="token punctuation">:</span> Inconsolata</pre></td></tr></table></figure><p>此功能基本参考 NexT。<br />
加粗标题的字体总是使用 <code>Noto Serif</code> ,为了正确友好的显示日文中的汉字,会先后加载 <code>headings</code> 和 <code>title</code> 的字体设置。</p>
<h1 id="iconfont图标"><a class="anchor" href="#iconfont图标">#</a> <code>iconfont</code> 图标</h1>
<p>主题没有直接使用 Font Awesome,是因为用不到那么多 icon 感觉非常浪费,因此在 Iconfont 上重新建立了一个项目。<br />
<code>font-family</code> 设为 <code>ic</code> ,所有字体样式前缀为 <code>i-</code> ,具体参见 <code>&lt;root&gt;/themes/shoka/source/css/_iconfont.styl</code> 。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment"># project of https://www.iconfont.cn/</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token comment"># //at.alicdn.com/t/font_1832207_c8i9n1ulxlt.css => 1832207_c8i9n1ulxlt</span></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">iconfont</span><span class="token punctuation">:</span> <span class="token string">"1832207_c8i9n1ulxlt"</span></pre></td></tr></table></figure><p>如果需要添加或修改,请留言告诉我您的<span class="exturl" data-url="aHR0cHM6Ly93d3cuaWNvbmZvbnQuY24v"> Iconfont</span> 用户名,我将把您添加到目前的<span class="exturl" data-url="aHR0cHM6Ly93d3cuaWNvbmZvbnQuY24vbWFuYWdlL2luZGV4P21hbmFnZV90eXBlPW15cHJvamVjdHMmYW1wO3Byb2plY3RJZD0xODMyMjA3">项目</span>中。</p>
<p>添加权限为 <code>只读</code> ,此后您可以任意全选,批量保存到购物车中,添加至您自己的项目里,并将主题配置文件中的 <code>iconfont</code> 值改为您的项目。</p>
<p>注意,您的项目应设置 <code>FontClass/Symbol 前缀</code> 为 <code>i-</code> 。</p>
<p>在 <code>&lt;root&gt;/source/_data/</code> 目录新建文件 <code>iconfont.styl</code> ,把新增或修改的图标样式复制到这个文件中。</p>
<blockquote>
<p>自定义 <code>iconfont.styl</code> 文件将覆盖主题默认样式,为了避免出错,请保证原有样式名均存在,在原有样式基础上进行增删改。</p>
</blockquote>
<h1 id="菜单与社交按钮"><a class="anchor" href="#菜单与社交按钮">#</a> 菜单与社交按钮</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">menu</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">home</span><span class="token punctuation">:</span> / <span class="token punctuation">|</span><span class="token punctuation">|</span> home</pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">about</span><span class="token punctuation">:</span> /about/ <span class="token punctuation">|</span><span class="token punctuation">|</span> user</pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">posts</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">default</span><span class="token punctuation">:</span> / <span class="token punctuation">|</span><span class="token punctuation">|</span> feather</pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">archives</span><span class="token punctuation">:</span> /archives/ <span class="token punctuation">|</span><span class="token punctuation">|</span> list<span class="token punctuation">-</span>alt</pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">categories</span><span class="token punctuation">:</span> /categories/ <span class="token punctuation">|</span><span class="token punctuation">|</span> th</pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">tags</span><span class="token punctuation">:</span> /tags/ <span class="token punctuation">|</span><span class="token punctuation">|</span> tags</pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token comment"># friends: /friends/ || heart</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token comment"># links: /links/ || magic</span></pre></td></tr><tr><td data-num="11"></td><td><pre></pre></td></tr><tr><td data-num="12"></td><td><pre><span class="token key atrule">social</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token key atrule">github</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//github.com/yourname <span class="token punctuation">|</span><span class="token punctuation">|</span> github <span class="token punctuation">|</span><span class="token punctuation">|</span> "<span class="token comment">#191717"</span></pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token comment">#google: https://plus.google.com/yourname || google</span></pre></td></tr><tr><td data-num="15"></td><td><pre> <span class="token key atrule">twitter</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//twitter.com/yourname <span class="token punctuation">|</span><span class="token punctuation">|</span> twitter <span class="token punctuation">|</span><span class="token punctuation">|</span> "<span class="token comment">#00aff0"</span></pre></td></tr><tr><td data-num="16"></td><td><pre> <span class="token key atrule">zhihu</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//www.zhihu.com/people/yourname <span class="token punctuation">|</span><span class="token punctuation">|</span> zhihu <span class="token punctuation">|</span><span class="token punctuation">|</span> "<span class="token comment">#1e88e5"</span></pre></td></tr><tr><td data-num="17"></td><td><pre> <span class="token key atrule">music</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//music.163.com/<span class="token comment">#/user/home?id=yourid || cloud-music || "#e60026"</span></pre></td></tr><tr><td data-num="18"></td><td><pre> <span class="token key atrule">weibo</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//weibo.com/yourname <span class="token punctuation">|</span><span class="token punctuation">|</span> weibo <span class="token punctuation">|</span><span class="token punctuation">|</span> "<span class="token comment">#ea716e"</span></pre></td></tr><tr><td data-num="19"></td><td><pre> <span class="token key atrule">about</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//about.me/yourname <span class="token punctuation">|</span><span class="token punctuation">|</span> address<span class="token punctuation">-</span>card <span class="token punctuation">|</span><span class="token punctuation">|</span> "<span class="token comment">#3b5998"</span></pre></td></tr><tr><td data-num="20"></td><td><pre> <span class="token comment">#email: mailto:[email protected] || envelope || "#55acd5"</span></pre></td></tr><tr><td data-num="21"></td><td><pre> <span class="token comment">#facebook: https://www.facebook.com/yourname || facebook</span></pre></td></tr><tr><td data-num="22"></td><td><pre> <span class="token comment">#stackoverflow: https://stackoverflow.com/yourname || stack-overflow</span></pre></td></tr><tr><td data-num="23"></td><td><pre> <span class="token comment">#youtube: https://youtube.com/yourname || youtube</span></pre></td></tr><tr><td data-num="24"></td><td><pre> <span class="token comment">#instagram: https://instagram.com/yourname || instagram</span></pre></td></tr><tr><td data-num="25"></td><td><pre> <span class="token comment">#skype: skype:yourname?call|chat || skype</span></pre></td></tr><tr><td data-num="26"></td><td><pre> <span class="token comment">#douban: https://www.douban.com/people/yourname/ || douban</span></pre></td></tr></table></figure><p>如上,使用 <code>||</code> 作为分隔符,依次为 <code>链接 || 图标 || 颜色</code> 。<br />
注意,只需要写图标名称,如 <code>github</code> ,则会自动转换为 <code>ic i-github</code> 。<br />
十六进制颜色码需要 <code>&quot;&quot;</code> 包绕。</p>
<p><code>menu</code> 支持一级子目录,子目录设置中的第一项必须为 <code>default</code> ,用来定义父级按钮的样式。</p>
<p>菜单显示文字可以在语言包中定义,<a href="../display/#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%AD%E8%A8%80%E5%8C%85">具体请戳这里</a></p>
<h1 id="边栏配置"><a class="anchor" href="#边栏配置">#</a> 边栏配置</h1>
<p>边栏可以选择在左侧,或右侧<br />
修改头像文件的地址,相对于静态文件目录 <code>images</code> 中配置的路径。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">sidebar</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token comment"># Sidebar Position.</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">position</span><span class="token punctuation">:</span> left</pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token comment">#position: right</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token comment"># Replace the default avatar image and set the url here.</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">avatar</span><span class="token punctuation">:</span> avatar.jpg</pre></td></tr></table></figure><p>可以将自己的图片放在 <code>&lt;root&gt;/source/_data/images/</code> 目录,甚至以同名覆盖主题内默认的头像图片,<a href="../display/#%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%BB%E9%A2%98%E5%9B%BE%E7%89%87">具体请戳这里</a></p>
<h1 id="底部widgets"><a class="anchor" href="#底部widgets">#</a> 底部 widgets</h1>
<p>目前页面底部可以显示两个小部件,即 <code>随机文章</code> 和 <code>最近评论</code> 。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">widgets</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">random_posts</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 显示随机文章</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">recent_comments</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 显示最近评论</span></pre></td></tr></table></figure><h1 id="字数及阅读时间统计"><a class="anchor" href="#字数及阅读时间统计">#</a> 字数及阅读时间统计</h1>
<p>安装好 <code>hexo-symbols-count-time</code> 插件后,不需要修改站点配置文件,直接使用插件默认配置就行。</p>
<p>需要修改主题配置文件,找到两处 <code>cout</code> ,修改为 <code>true</code> :</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token comment"># 页尾全站统计</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">footer</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">since</span><span class="token punctuation">:</span> <span class="token number">2010</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">count</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="5"></td><td><pre></pre></td></tr><tr><td data-num="6"></td><td><pre><span class="token comment"># 文章界面统计</span></pre></td></tr><tr><td data-num="7"></td><td><pre><span class="token key atrule">post</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">count</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr></table></figure><h1 id="文章评论"><a class="anchor" href="#文章评论">#</a> 文章评论</h1>
<p><span class="exturl" data-url="aHR0cHM6Ly92YWxpbmUuanMub3JnL3F1aWNrc3RhcnQuaHRtbA==">如何获取 LeanCloud 的 appId 和 appKey</span>。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">valine</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">appId</span><span class="token punctuation">:</span> <span class="token comment">#Your_appId</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">appKey</span><span class="token punctuation">:</span> <span class="token comment">#Your_appkey</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">placeholder</span><span class="token punctuation">:</span> ヽ(○´∀`)ノ♪ <span class="token comment"># Comment box placeholder</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">avatar</span><span class="token punctuation">:</span> mp <span class="token comment"># Gravatar style : mp, identicon, monsterid, wavatar, robohash, retro</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">pageSize</span><span class="token punctuation">:</span> <span class="token number">10</span> <span class="token comment"># Pagination size</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">lang</span><span class="token punctuation">:</span> zh<span class="token punctuation">-</span>CN</pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">visitor</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 文章访问量统计</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token key atrule">NoRecordIP</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token comment"># 不记录 IP</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token key atrule">serverURLs</span><span class="token punctuation">:</span> <span class="token comment"># When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token key atrule">powerMode</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 默认打开评论框输入特效</span></pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token key atrule">tagMeta</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token key atrule">visitor</span><span class="token punctuation">:</span> 新朋友</pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token key atrule">master</span><span class="token punctuation">:</span> 主人</pre></td></tr><tr><td data-num="15"></td><td><pre> <span class="token key atrule">friend</span><span class="token punctuation">:</span> 小伙伴</pre></td></tr><tr><td data-num="16"></td><td><pre> <span class="token key atrule">investor</span><span class="token punctuation">:</span> 金主粑粑</pre></td></tr><tr><td data-num="17"></td><td><pre> <span class="token key atrule">tagColor</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="18"></td><td><pre> <span class="token key atrule">master</span><span class="token punctuation">:</span> <span class="token string">"var(--color-orange)"</span></pre></td></tr><tr><td data-num="19"></td><td><pre> <span class="token key atrule">friend</span><span class="token punctuation">:</span> <span class="token string">"var(--color-aqua)"</span></pre></td></tr><tr><td data-num="20"></td><td><pre> <span class="token key atrule">investor</span><span class="token punctuation">:</span> <span class="token string">"var(--color-pink)"</span></pre></td></tr><tr><td data-num="21"></td><td><pre> <span class="token key atrule">tagMember</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="22"></td><td><pre> <span class="token key atrule">master</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="23"></td><td><pre> <span class="token comment"># - hash of [email protected]</span></pre></td></tr><tr><td data-num="24"></td><td><pre> <span class="token comment"># - hash of [email protected]</span></pre></td></tr><tr><td data-num="25"></td><td><pre> <span class="token key atrule">friend</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="26"></td><td><pre> <span class="token comment"># - hash of [email protected]</span></pre></td></tr><tr><td data-num="27"></td><td><pre> <span class="token comment"># - hash of [email protected]</span></pre></td></tr><tr><td data-num="28"></td><td><pre> <span class="token key atrule">investor</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="29"></td><td><pre> <span class="token comment"># - hash of [email protected]</span></pre></td></tr></table></figure><p>tag 标签显示在评论者名字的后面,默认是 <code>tagMeta.visitor</code> 对应的值。<br />
在 <code>tagMeta</code> 和 <code>tagColor</code> 中,除了 <code>visitor</code> 这个 key 不能修改外,其他 key 都可以换一换,但需要保证一致性。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"><span>举个栗子</span></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">tagMeta</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">visitor</span><span class="token punctuation">:</span> 游客</pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">admin</span><span class="token punctuation">:</span> 管理员</pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">waifu</span><span class="token punctuation">:</span> 我老婆</pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">tagColor</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">visitor</span><span class="token punctuation">:</span> <span class="token string">"#855194"</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">admin</span><span class="token punctuation">:</span> <span class="token string">"#a77c59"</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">waifu</span><span class="token punctuation">:</span> <span class="token string">"#ed6ea0"</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token key atrule">tagMember</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token key atrule">admin</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token comment"># - hash of [email protected]</span></pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token key atrule">waifu</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token comment"># - hash of [email protected]</span></pre></td></tr></table></figure><p>在文章 Front Matter 中也可以配置上述参数,访问该文章页面时,将覆盖全局配置。<br />
尤其可以用来配置一个特殊的 placeholder。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">valine</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">placeholder</span><span class="token punctuation">:</span> <span class="token string">"1. 提问前请先仔细阅读本文档⚡\n2. 页面显示问题💥,请提供控制台截图📸或者您的测试网址\n3. 其他任何报错💣,请提供详细描述和截图📸,祝食用愉快💪"</span></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token punctuation">---</span></pre></td></tr></table></figure><p>评论通知与管理工具建议使用这个<span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL0Rlc2VydHNQL1ZhbGluZS1BZG1pbg=="> Valine-Admin</span>。<br />
注意 <code>SITE_URL</code> 需要以 <code>/</code> 结尾。</p>
<p>如果某一篇文章需要关闭评论功能,则在文章 Front Matter 中配置:</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token punctuation">---</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">title</span><span class="token punctuation">:</span> 关闭评论</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">comment</span><span class="token punctuation">:</span> <span class="token boolean important">false</span></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token punctuation">---</span></pre></td></tr></table></figure><h1 id="背景音乐"><a class="anchor" href="#背景音乐">#</a> 背景音乐</h1>
<p>在主题配置文件中,设置全局播放列表。<br />
在文章的 Front Matter 中,设置文章专有播放列表,访问该文章页面时,将覆盖全局配置。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"><span>单列表</span></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">audio</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token punctuation">-</span> https<span class="token punctuation">:</span>//music.163.com/song<span class="token punctuation">?</span>id=1387098940</pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token punctuation">-</span> https<span class="token punctuation">:</span>//music.163.com/<span class="token comment">#/playlist?id=2088001742</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token punctuation">-</span> https<span class="token punctuation">:</span>//www.xiami.com/collect/250830668</pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token punctuation">-</span> https<span class="token punctuation">:</span>//y.qq.com/n/yqq/playsquare/3535982902.html</pre></td></tr></table></figure><p>如上,可以直接使用网易云、虾米、QQ 音乐的播放列表、单曲,可以同时填写多个。</p>
<figure class="highlight yml"><figcaption data-lang="YAML"><span>多列表</span></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">audio</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">title</span><span class="token punctuation">:</span> 列表1</pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">list</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token punctuation">-</span> https<span class="token punctuation">:</span>//music.163.com/<span class="token comment">#/playlist?id=2943811283</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token punctuation">-</span> https<span class="token punctuation">:</span>//music.163.com/<span class="token comment">#/playlist?id=2297706586</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">title</span><span class="token punctuation">:</span> 列表2</pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">list</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token punctuation">-</span> https<span class="token punctuation">:</span>//music.163.com/<span class="token comment">#/playlist?id=2031842656</span></pre></td></tr></table></figure><p>如果需要自定义媒体文件,可以按照以下格式填写:</p>
<figure class="highlight yml"><figcaption data-lang="YAML"><span>单列表</span></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">audio</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> <span class="token string">"曲目1"</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">url</span><span class="token punctuation">:</span> <span class="token string">"播放地址"</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">artist</span><span class="token punctuation">:</span> <span class="token string">"艺术家"</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">cover</span><span class="token punctuation">:</span> <span class="token string">"封面"</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">lrc</span><span class="token punctuation">:</span> <span class="token string">"歌词"</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> <span class="token string">"曲目2"</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">url</span><span class="token punctuation">:</span> <span class="token string">"播放地址"</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token key atrule">artist</span><span class="token punctuation">:</span> <span class="token string">"艺术家"</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token key atrule">cover</span><span class="token punctuation">:</span> <span class="token string">"封面"</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token key atrule">lrc</span><span class="token punctuation">:</span> <span class="token string">"歌词"</span></pre></td></tr></table></figure><figure class="highlight yml"><figcaption data-lang="YAML"><span>多列表</span></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">audio</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">title</span><span class="token punctuation">:</span> 列表1</pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">list</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> <span class="token string">"曲目1"</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">url</span><span class="token punctuation">:</span> <span class="token string">"播放地址"</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">artist</span><span class="token punctuation">:</span> <span class="token string">"艺术家"</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">cover</span><span class="token punctuation">:</span> <span class="token string">"封面"</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">lrc</span><span class="token punctuation">:</span> <span class="token string">"歌词"</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> <span class="token string">"曲目2"</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token key atrule">url</span><span class="token punctuation">:</span> <span class="token string">"播放地址"</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token key atrule">artist</span><span class="token punctuation">:</span> <span class="token string">"艺术家"</span></pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token key atrule">cover</span><span class="token punctuation">:</span> <span class="token string">"封面"</span></pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token key atrule">lrc</span><span class="token punctuation">:</span> <span class="token string">"歌词"</span></pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">title</span><span class="token punctuation">:</span> 列表2</pre></td></tr><tr><td data-num="15"></td><td><pre> <span class="token key atrule">list</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="16"></td><td><pre> <span class="token punctuation">-</span> https<span class="token punctuation">:</span>//music.163.com/<span class="token comment">#/playlist?id=2031842656</span></pre></td></tr></table></figure><p>如果要关闭当前页面的背景音乐播放器,则在文章 Front Matter 中配置:</p>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token punctuation">---</span></pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token key atrule">title</span><span class="token punctuation">:</span> 关闭背景音乐</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">audio</span><span class="token punctuation">:</span> <span class="token boolean important">false</span></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token punctuation">---</span></pre></td></tr></table></figure><h1 id="随机图库"><a class="anchor" href="#随机图库">#</a> 随机图库</h1>
<ul>
<li>
<p>默认的图片列表位于 <code>&lt;root&gt;/themes/shoka/_images.yml</code> 中。<br />
使用了渣浪图库,使用一些上传工具,比如<span class="exturl" data-url="aHR0cHM6Ly9waWMuZ2ltaG95LmNvbS8=">这里</span><br />
上传后图片的链接是 <code>http://wx4.sinaimg.cn/large/6833939bly1gicmnywqgpj20zk0m8dwx.jpg</code> 。<br />
只需要新一行写上 <code>- 6833939bly1gicmnywqgpj20zk0m8dwx.jpg</code> 。</p>
<p>如果想要自定义,则在 <code>&lt;root&gt;/source/_data/</code> 目录新建一个 <code>images.yml</code> 文件,这个文件中的图片至少 6 枚,将完全覆盖默认的图片列表。</p>
</li>
<li>
<p>也可以直接在图片列表 yml 文件中,写上任意外链图片地址</p>
</li>
</ul>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token punctuation">-</span> https<span class="token punctuation">:</span>//i.loli.net/2020/10/30/qAMYEFXxJcKRsiG.gif</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token punctuation">-</span> https<span class="token punctuation">:</span>//i.loli.net/2020/10/30/rjdhcSgEN8COBPA.jpg</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token punctuation">-</span> https<span class="token punctuation">:</span>//i.loli.net/2020/10/30/HKyzSd7NI3mlBpt.jpg</pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token punctuation">-</span> https<span class="token punctuation">:</span>//i.loli.net/2020/10/30/Y1CBXqgeokEs457.jpg</pre></td></tr><tr><td data-num="5"></td><td><pre><span class="token punctuation">-</span> https<span class="token punctuation">:</span>//i.loli.net/2020/10/30/Z5W6r2BSoiThHG1.jpg</pre></td></tr></table></figure><ul>
<li>也可以在主题配置文件中,设置图床 API:</li>
</ul>
<figure class="highlight yml"><figcaption data-lang="YAML"><span>比如</span></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">image_server</span><span class="token punctuation">:</span> <span class="token string">"https://acg.xydwz.cn/api/api.php"</span></pre></td></tr></table></figure><h1 id="加载第三方组件"><a class="anchor" href="#加载第三方组件">#</a> 加载第三方组件</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">vendors</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">css</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token comment"># 略略略</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">js</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token comment"># 略略略</span></pre></td></tr></table></figure><p>包括</p>
<table>
<tbody>
<tr>
<td><code>pace</code></td>
<td>加载进度条</td>
<td>全局</td>
</tr>
<tr>
<td><code>pjax</code></td>
<td>页面无刷新加载</td>
<td>全局</td>
</tr>
<tr>
<td><code>anime</code></td>
<td>js 动画效果</td>
<td>全局</td>
</tr>
<tr>
<td><code>algolia</code> <code>instantsearch</code></td>
<td>基于 algolia 的站内搜索</td>
<td>全局</td>
</tr>
<tr>
<td><code>lazyload</code></td>
<td>图片懒加载</td>
<td>全局</td>
</tr>
<tr>
<td><code>quicklink</code></td>
<td>链接资源预加载</td>
<td>全局</td>
</tr>
<tr>
<td><code>fetch</code></td>
<td>获取播放列表</td>
<td>全局</td>
</tr>
<tr>
<td><code>katex</code> <code>copy_tex</code></td>
<td>数学公式显示及复制</td>
<td>按需</td>
</tr>
<tr>
<td><code>fancybox</code></td>
<td>图片放大显示及排列</td>
<td>按需</td>
</tr>
<tr>
<td><code>valine</code></td>
<td>基于 LeanCloud 的评论系统及文章阅读次数统计</td>
<td>按需</td>
</tr>
<tr>
<td><code>chart</code></td>
<td>图表显示</td>
<td>按需</td>
</tr>
</tbody>
</table>
<p>以上文件加载全部基于 jsDelivr,并对全局加载的组件进行了文件合并。<br />
如果不明白啥意思,则不要轻易修改。</p>
<div class="note danger">
<p>主题版本升级的时候,可能会修改这里。<br />
如果修改过主题默认 <code>_config.yml</code> ,记得更新主题时,末尾的 <code>vendors</code> 也要及时修改。</p>
</div>
</content>
<category term="计算机科学" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/" />
<category term="二进制杂谈" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%9D%82%E8%B0%88/" />
<category term="Theme Shoka Documentation" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%9D%82%E8%B0%88/Theme-Shoka-Documentation/" />
<category term="Hexo" scheme="https://akiting01.github.io/shoka/tags/Hexo/" />
<category term="教程" scheme="https://akiting01.github.io/shoka/tags/%E6%95%99%E7%A8%8B/" />
<updated>2020-08-13T12:56:48.000Z</updated>
</entry>
<entry>
<id>https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/dependents/</id>
<title>Step.1 依赖插件</title>
<link rel="alternate" href="https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/dependents/"/>
<content type="html"><div class="note primary">
<p><a href="/computer-science/note/theme-shoka-doc/">🚀快速开始</a> - <a href="/computer-science/note/theme-shoka-doc/dependents/"><strong>💌依赖插件</strong></a> - <a href="/computer-science/note/theme-shoka-doc/config/">📌基本配置</a> - <a href="/computer-science/note/theme-shoka-doc/display/">🌈界面显示</a> - <a href="/computer-science/note/theme-shoka-doc/special/">🦄特殊功能</a></p>
</div>
<div class="note warning">
<p>请务必将 hexo-renderer-multi-markdown-it 升级到最新版,目前为 0.1.5</p>
</div>
<p>Theme Shoka 依赖以下 Hexo 插件</p>
<table>
<thead>
<tr>
<th>插件名称</th>
<th>npm 地址</th>
<th>功能</th>
<th>依赖程度</th>
</tr>
</thead>
<tbody>
<tr>
<td>hexo-renderer-multi-markdown-it</td>
<td><span class="exturl" data-url="aHR0cHM6Ly93d3cubnBtanMuY29tL3BhY2thZ2UvaGV4by1yZW5kZXJlci1tdWx0aS1tYXJrZG93bi1pdA==">链接</span></td>
<td>md 文件渲染器,压缩 css/js/html</td>
<td>必需</td>
</tr>
<tr>
<td>hexo-autoprefixer</td>
<td><span class="exturl" data-url="aHR0cHM6Ly93d3cubnBtanMuY29tL3BhY2thZ2UvaGV4by1hdXRvcHJlZml4ZXI=">链接</span></td>
<td>给生成的 css 文件们添加浏览器前缀</td>
<td>必需</td>
</tr>
<tr>
<td>hexo-algoliasearch</td>
<td><span class="exturl" data-url="aHR0cHM6Ly93d3cubnBtanMuY29tL3BhY2thZ2UvaGV4by1hbGdvbGlhc2VhcmNo">链接</span></td>
<td>站内搜索功能</td>
<td>搜索按钮失灵</td>
</tr>
<tr>
<td>hexo-symbols-count-time</td>
<td><span class="exturl" data-url="aHR0cHM6Ly93d3cubnBtanMuY29tL3BhY2thZ2UvaGV4by1zeW1ib2xzLWNvdW50LXRpbWU=">链接</span></td>
<td>文章或站点字数及阅读时间统计</td>
<td>统计没有</td>
</tr>
<tr>
<td>hexo-feed</td>
<td><span class="exturl" data-url="aHR0cHM6Ly93d3cubnBtanMuY29tL3BhY2thZ2UvaGV4by1mZWVk">链接</span></td>
<td>生成 Feed 文件</td>
<td>Feed 文件没有</td>
</tr>
</tbody>
</table>
<blockquote>
<p>没有正确安装以上插件的话,本主题会报错 or 无法正确显示 or 部分功能失效。<br />
<code>hexo-renderer-multi-markdown-it</code> 请注意升级到最新版</p>
</blockquote>
<p>安装完以上插件后,修改站点配置文件,加入相关配置。</p>
<h1 id="multi-markdown-it安装与配置"><a class="anchor" href="#multi-markdown-it安装与配置">#</a> multi-markdown-it 安装与配置</h1>
<h2 id="安装"><a class="anchor" href="#安装">#</a> 安装</h2>
<ol>
<li>
<p>安装前,记得务必卸载掉默认的 <code>hexo-renderer-marked</code> ,以及别的 markdown 文件渲染器。</p>
<figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">npm</span> un hexo-renderer-marked --save</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token comment"># 或者</span></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token function">yarn</span> remove hexo-renderer-marked</pre></td></tr></table></figure></li>
<li>
<p>安装</p>
<figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">npm</span> i hexo-renderer-multi-markdown-it --save</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token comment"># 或者</span></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token function">yarn</span> <span class="token function">add</span> hexo-renderer-multi-markdown-it</pre></td></tr></table></figure></li>
<li>
<p>如果安装缓慢,或者失败<br />
如报错</p>
<figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>ERROR: Failed to download Chromium r515411<span class="token operator">!</span> Set <span class="token string">"PUPPETEER_SKIP_CHROMIUM_DOWNLOAD"</span> <span class="token function">env</span> variable to skip download.</pre></td></tr></table></figure><p>因为有一步需要下载 puppeteer 里的 Chromium 内核,基于天朝内部网络现状,这一步能不能成功要靠科学和运气,所以为了避免安装失败,需要加上 <code>--ignore-scripts</code> 跳过 Chromium 内核的下载。</p>
<figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">npm</span> i hexo-renderer-multi-markdown-it --save --ignore-scripts</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token comment"># 或者</span></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token function">yarn</span> <span class="token function">add</span> hexo-renderer-multi-markdown-it --ignore-scripts</pre></td></tr></table></figure><p>puppeteer 主要是用来渲染 mermaid 流程图,只要文章中不使用 mermaid 就没有任何问题,如果要使用 mermaid 建议还是想办法完全安装。</p>
</li>
</ol>
<h2 id="配置"><a class="anchor" href="#配置">#</a> 配置</h2>
<ol>
<li>加入 <code>markdown</code> 配置,用来渲染 md 文件</li>
</ol>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">markdown</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">render</span><span class="token punctuation">:</span> <span class="token comment"># 渲染器设置</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">html</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token comment"># 过滤 HTML 标签</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">xhtmlOut</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 使用 '/' 来闭合单标签 (比如 &lt;br />)。</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">breaks</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 转换段落里的 '\n' 到 &lt;br>。</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">linkify</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># 将类似 URL 的文本自动转换为链接。</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">typographer</span><span class="token punctuation">:</span> </pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">quotes</span><span class="token punctuation">:</span> <span class="token string">'“”‘’'</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token key atrule">plugins</span><span class="token punctuation">:</span> <span class="token comment"># markdown-it 插件设置</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">plugin</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token key atrule">name</span><span class="token punctuation">:</span> markdown<span class="token punctuation">-</span>it<span class="token punctuation">-</span>toc<span class="token punctuation">-</span>and<span class="token punctuation">-</span>anchor</pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token key atrule">options</span><span class="token punctuation">:</span> <span class="token comment"># 文章目录以及锚点应用的 class 名称,shoka 主题必须设置成这样</span></pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token key atrule">tocClassName</span><span class="token punctuation">:</span> <span class="token string">'toc'</span></pre></td></tr><tr><td data-num="15"></td><td><pre> <span class="token key atrule">anchorClassName</span><span class="token punctuation">:</span> <span class="token string">'anchor'</span></pre></td></tr><tr><td data-num="16"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">plugin</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="17"></td><td><pre> <span class="token key atrule">name</span><span class="token punctuation">:</span> markdown<span class="token punctuation">-</span>it<span class="token punctuation">-</span>multimd<span class="token punctuation">-</span>table</pre></td></tr><tr><td data-num="18"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="19"></td><td><pre> <span class="token key atrule">options</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="20"></td><td><pre> <span class="token key atrule">multiline</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="21"></td><td><pre> <span class="token key atrule">rowspan</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="22"></td><td><pre> <span class="token key atrule">headerless</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="23"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">plugin</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="24"></td><td><pre> <span class="token key atrule">name</span><span class="token punctuation">:</span> ./markdown<span class="token punctuation">-</span>it<span class="token punctuation">-</span>furigana</pre></td></tr><tr><td data-num="25"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="26"></td><td><pre> <span class="token key atrule">options</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="27"></td><td><pre> <span class="token key atrule">fallbackParens</span><span class="token punctuation">:</span> <span class="token string">"()"</span></pre></td></tr><tr><td data-num="28"></td><td><pre> <span class="token punctuation">-</span> <span class="token key atrule">plugin</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="29"></td><td><pre> <span class="token key atrule">name</span><span class="token punctuation">:</span> ./markdown<span class="token punctuation">-</span>it<span class="token punctuation">-</span>spoiler</pre></td></tr><tr><td data-num="30"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="31"></td><td><pre> <span class="token key atrule">options</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="32"></td><td><pre> <span class="token key atrule">title</span><span class="token punctuation">:</span> <span class="token string">"你知道得太多了"</span></pre></td></tr></table></figure><ol start="2">
<li>加入 <code>minify</code> 配置,压缩 css/js/html</li>
</ol>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">minify</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">html</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">exclude</span><span class="token punctuation">:</span> <span class="token comment"># 排除 hexo-feed 用到的模板文件</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">'**/json.ejs'</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">'**/atom.ejs'</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">'**/rss.ejs'</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">css</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token key atrule">exclude</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">'**/*.min.css'</span></pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token key atrule">js</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token key atrule">mangle</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="15"></td><td><pre> <span class="token key atrule">toplevel</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="16"></td><td><pre> <span class="token key atrule">output</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="17"></td><td><pre> <span class="token key atrule">compress</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="18"></td><td><pre> <span class="token key atrule">exclude</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="19"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">'**/*.min.js'</span></pre></td></tr></table></figure><ol start="3">
<li>停用默认代码高亮功能,否则代码块的 mac 样式不能正常显示。<br />
找到 <code>highlight</code> 和 <code>prismjs</code> ,把 <code>enable</code> 改成 <code>false</code> 。</li>
</ol>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">highlight</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">false</span></pre></td></tr><tr><td data-num="3"></td><td><pre></pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token key atrule">prismjs</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">false</span></pre></td></tr></table></figure><h1 id="autoprefixer配置建议"><a class="anchor" href="#autoprefixer配置建议">#</a> autoprefixer 配置建议</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">autoprefixer</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">exclude</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token punctuation">-</span> <span class="token string">'*.min.css'</span></pre></td></tr></table></figure><p>缺少这个插件,首页卡片翻转效果在部分浏览器中无法正确显示。</p>
<h1 id="algolia配置建议"><a class="anchor" href="#algolia配置建议">#</a> algolia 配置建议</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">algolia</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="2"></td><td><pre> <span class="token key atrule">appId</span><span class="token punctuation">:</span> <span class="token comment">#Your appId</span></pre></td></tr><tr><td data-num="3"></td><td><pre> <span class="token key atrule">apiKey</span><span class="token punctuation">:</span> <span class="token comment">#Your apiKey</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">adminApiKey</span><span class="token punctuation">:</span> <span class="token comment">#Your adminApiKey</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">chunkSize</span><span class="token punctuation">:</span> <span class="token number">5000</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">indexName</span><span class="token punctuation">:</span> <span class="token comment">#"shoka"</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">fields</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token punctuation">-</span> title <span class="token comment">#必须配置</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token punctuation">-</span> path <span class="token comment">#必须配置</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token punctuation">-</span> categories <span class="token comment">#推荐配置</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token punctuation">-</span> content<span class="token punctuation">:</span>strip<span class="token punctuation">:</span>truncate<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">2000</span></pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token punctuation">-</span> gallery</pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token punctuation">-</span> photos</pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token punctuation">-</span> tags</pre></td></tr></table></figure><h1 id="feed配置建议"><a class="anchor" href="#feed配置建议">#</a> feed 配置建议</h1>
<figure class="highlight yml"><figcaption data-lang="YAML"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token key atrule">keywords</span><span class="token punctuation">:</span> <span class="token comment">#站点关键词,用 “,” 分隔</span></pre></td></tr><tr><td data-num="2"></td><td><pre></pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token key atrule">feed</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="4"></td><td><pre> <span class="token key atrule">limit</span><span class="token punctuation">:</span> <span class="token number">20</span></pre></td></tr><tr><td data-num="5"></td><td><pre> <span class="token key atrule">order_by</span><span class="token punctuation">:</span> <span class="token string">"-date"</span></pre></td></tr><tr><td data-num="6"></td><td><pre> <span class="token key atrule">tag_dir</span><span class="token punctuation">:</span> <span class="token boolean important">false</span></pre></td></tr><tr><td data-num="7"></td><td><pre> <span class="token key atrule">category_dir</span><span class="token punctuation">:</span> <span class="token boolean important">false</span></pre></td></tr><tr><td data-num="8"></td><td><pre> <span class="token key atrule">rss</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="9"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="10"></td><td><pre> <span class="token key atrule">template</span><span class="token punctuation">:</span> <span class="token string">"themes/shoka/layout/_alternate/rss.ejs"</span></pre></td></tr><tr><td data-num="11"></td><td><pre> <span class="token key atrule">output</span><span class="token punctuation">:</span> <span class="token string">"rss.xml"</span></pre></td></tr><tr><td data-num="12"></td><td><pre> <span class="token key atrule">atom</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="13"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="14"></td><td><pre> <span class="token key atrule">template</span><span class="token punctuation">:</span> <span class="token string">"themes/shoka/layout/_alternate/atom.ejs"</span></pre></td></tr><tr><td data-num="15"></td><td><pre> <span class="token key atrule">output</span><span class="token punctuation">:</span> <span class="token string">"atom.xml"</span></pre></td></tr><tr><td data-num="16"></td><td><pre> <span class="token key atrule">jsonFeed</span><span class="token punctuation">:</span></pre></td></tr><tr><td data-num="17"></td><td><pre> <span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span></pre></td></tr><tr><td data-num="18"></td><td><pre> <span class="token key atrule">template</span><span class="token punctuation">:</span> <span class="token string">"themes/shoka/layout/_alternate/json.ejs"</span></pre></td></tr><tr><td data-num="19"></td><td><pre> <span class="token key atrule">output</span><span class="token punctuation">:</span> <span class="token string">"feed.json"</span></pre></td></tr></table></figure></content>
<category term="计算机科学" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/" />
<category term="二进制杂谈" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%9D%82%E8%B0%88/" />
<category term="Theme Shoka Documentation" scheme="https://akiting01.github.io/shoka/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%9D%82%E8%B0%88/Theme-Shoka-Documentation/" />
<category term="Hexo" scheme="https://akiting01.github.io/shoka/tags/Hexo/" />
<category term="教程" scheme="https://akiting01.github.io/shoka/tags/%E6%95%99%E7%A8%8B/" />
<updated>2020-08-13T12:46:48.000Z</updated>
</entry>
<entry>
<id>https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/</id>
<title>Hexo主题Shoka & multi-markdown-it渲染器使用说明</title>
<link rel="alternate" href="https://akiting01.github.io/shoka/computer-science/note/theme-shoka-doc/"/>
<content type="html"><div class="note info">
<p>跳票 N 久终于更新的简单的使用说明</p>
<ul>
<li><span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2FtZWhpbWUvaGV4by10aGVtZS1zaG9rYQ==">hexo-theme-shoka</span> :本博客自用的主题</li>
<li><span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2FtZWhpbWUvaGV4by1yZW5kZXJlci1tdWx0aS1tYXJrZG93bi1pdA==">hexo-renderer-multi-markdown-it</span>:配套的 markdown 渲染器</li>
</ul>
<p>已经支持 hexo 5。</p>