solitude更新到version: 3.0.19后,我发现行内代码的渲染居然没有了,原以为是我的配置问题,可是看回主题网站的示例,行内代码确实没有渲染。不行,对于我这种颜值控来说,接受不了🙁于是决定自己动手解决这一问题,解决过程如下:

1.手动编写cutom.styl文件

themes\solitude\source\css目录下新建一个custom.styl文件,内容如下:

1
2
3
4
5
6
7
8
9
.article-container code:not([class*="language-"])
background: #f5f2f0 !important
color: #c7254e !important
border-radius: 4px !important
padding: 2px 6px !important
font-size: 0.95em !important
font-family: "Fira Mono", "Consolas", "Menlo", monospace !important
box-shadow: none !important
border: none !important

特别注意: 这里需要加上!important,以确保自定义的样式获得最高优先级,不被原有定义所覆盖

2.引用custom.styl文件

themes\solitude\source\css\index.styl的最后一行,加入以下内容实现引用:

1
@import 'custom.styl'

这样就可以自行实现对行内代码的渲染了😊