1.首先需要动的地方有:
- 主题的_config.yml文件
- 站点的_config.yml文件
- 代码块的语言标注
2.在站点的配置文件中,搜索hightlight:
highlight:
enable: true
line_number: true
auto_detect: true
tab_replace:
文字自动检测默认不启动,所以改成true使其起作用。
3.再到主题的配置文件:
highlight_theme: normal,注释显示有五种显示主题可用
- normal
- night
- night eighties
- night blue
- night bright
4.代码中设置
'``Python
code here
'``