准备自定义字体以及css
在/source
新建一个/fonts
文件夹,把你的字体扔进去
在/source/css
新建一个fonts.css
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
| @font-face { font-family: 'MyCustomFont'; src: url('/fonts/meow.otf') format('opentype'); font-weight: normal; font-style: normal; }
@font-face { font-family: 'MyCodeFont'; src: url('/fonts/shaonv.ttf') format('truetype'); font-weight: normal; font-style: normal; }
body { font-family: 'MyCustomFont', "Georgia", "Arial", sans-serif; font-size: 16px; }
code, pre { font-family: 'MyCodeFont', "Fira Code", "Courier", monospace; font-size: 16px; }
|
引入css并设置字体
编辑Butterfly的_config.yml
引入css
1 2 3 4 5 6 7
|
inject: head: - <link rel="stylesheet" href=" /css/transpancy.css"> - <link rel="stylesheet" href=" /css/fonts.css">
|
字体部分
1 2 3 4 5
| font: global-font-size: 16px code-font-size: 16px font-family: MyCustomFont, "Georgia", "Arial", sans-serif code-font-family: MyCodeFont, "Fira Code", "Courier", monospace
|
大功告成!