经验分享Hexohexo|Butterfly主题更换字体
叶一片
创建font文件夹
在 themes/butterfly/source/
下创建font
文件夹
将HarmonyOS_Sans_SC_Regular.ttf
和JetBrainsMono-Regular.ttf
放进font
创建css
在themes/butterfly/source/css/
下创建font.css
编辑font.css
1 2 3 4 5 6 7 8 9 10 11 12 13
| @font-face{ font-family: 'JetBrains Mono'; font-display: swap; src: url('../font/JetBrainsMono-Regular.ttf') format("truetype"); } @font-face{ font-family: 'HarmonyOS Sans SC'; font-display: swap; src: url('../font/HarmonyOS_Sans_SC_Regular.ttf') format("truetype"); } body { font-family: 'JetBrains Mono','HarmonyOS Sans SC'; }
|
编辑_config.butterfly.yml
1 2 3 4 5 6 7 8 9
|
inject: head: - <link rel="stylesheet" href="/css/font.css"> bottom:
|