Code Syntax Highlighting with Rouge
Syntax highlighting is performed by Jekyll’s built-in Rouge.
Rouge supports a ton of languages, and you can find the short-codes
here.
The theme used is Dracula, and it’s located in the /_assets/scss/custom/includes/_syntax_highlighting.scss
file.
I’ve added some small border, margin, and padding refinements to the highlight
class:
You can tweak this all you want and/or swap out the entire contents of the _syntax_highlighting.scss
file to make it your own.
Code highlighting examples
Terminal (shell)
HTML
JavaScript
Liquid
When writing Liquid code snippets, be sure to surround your Liquid code with raw/endraw tags, or Jekyll will actually process the code as written. See here for more info.