试图简单地更改一些有关 github 上 Jekyll 页面中代码突出显示的内容,但无法让任何内容正常工作。
阅读了很多页面/问题后,我尝试过:
添加各种看似随机的 scss 文件(_base.scss、_highlights.scss、_syntax_highlighting.scss)
.highlight {
…
}
添加main.css和syntax.css
—
# Some Jekyll nonsense… (not needed in other scss files).
—
@import “syntax”;
将以下代码片段添加到 _config.yml
# Jekyll 3 now only supports Kramdown for Markdown
kramdown:
# Use GitHub flavored markdown, including triple backtick fenced code blocks
input: GFM
# Jekyll 3 and GitHub Pages now only support rouge for syntax highlighting
syntax_highlighter: rouge
syntax_highlighter_opts:
# Use existing pygments syntax highlighting css
css_class: ‘highlight’
sass:
style: compressed