Hexo主题配置

本文最后更新于:2022年1月23日 下午

Hexo-Theme-Fluid主题配置

代码块添加MAC风格

借鉴来源:建议添加mac风格的代码块显示 #538

MAC代码风格

  1. 在博客目录...\Blog\node_modules\hexo-theme-fluid\source\css\下新建一个文件:macpanel.styl,输入以下内容:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.highlight
background: #21252b
border-radius: 5px
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4)
padding-top: 30px

&::before
background: #fc625d
border-radius: 50%
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b
content: ' '
height: 12px
left: 12px
margin-top: -20px
position: absolute
width: 12px
  1. 修改主题的配置文件_config_fluid.yml,找到custom_css:字段,输入以下内容即可:
1
2
custom_css:
- /css/macpanel