Jekyll 导入语法突出显示颜色方案
Jekyll Minima 主题的语法突出显示在文件 _sass/_syntax-highlighting.scss
中定义。
从该文件复制的代码片段是:
.c { color: #998; font-style: italic } // Comment
.err { color: #a61717; background-color: #e3d2d2 } // Error
.k { font-weight: bold } // Keyword
.o { font-weight: bold } // Operator
.cm { color: #998; font-style: italic } // Comment.Multiline
.cp { color: #999; font-weight: bold } // Comment.Preproc
.c1 { color: #998; font-style: italic } // Comment.Single
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
.gd { color: #000; background-color: #fdd } // Generic.Deleted
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
.ge { font-style: italic } // Generic.Emph
我想更改配色方案,例如更改为 Palenight 主题。一种方法是将代码从 _syntax-highlighting.scss
复制到我的站点存储库并手动更改颜色。
在 Jekyll 中执行此操作的常规方法是什么?有更有效的方法吗?
The syntax highlighting for Jekyll Minima theme is defined in the file _sass/_syntax-highlighting.scss
.
A snippet of code copied from that file is:
.c { color: #998; font-style: italic } // Comment
.err { color: #a61717; background-color: #e3d2d2 } // Error
.k { font-weight: bold } // Keyword
.o { font-weight: bold } // Operator
.cm { color: #998; font-style: italic } // Comment.Multiline
.cp { color: #999; font-weight: bold } // Comment.Preproc
.c1 { color: #998; font-style: italic } // Comment.Single
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
.gd { color: #000; background-color: #fdd } // Generic.Deleted
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
.ge { font-style: italic } // Generic.Emph
I want to change the colour scheme, for example, to the Palenight theme. One way to do this is to copy the code from _syntax-highlighting.scss
to my site repository and change the colours manually.
What is the conventional way to do this in Jekyll? Is there a more efficient way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这是常规方式。您从主题复制文件并在本地覆盖
I think this is the conventional way. You copy the file from the theme and override it locally