cheatsheets devlog projects search

syntax-highlighting.md

Adding Syntax Highlighting to the Blog

2023-01-23 3

I use blackfriday, the golang markdown package, to generate my blog and I realized that it does syntax highlighting painlessly. I am now updating all of my snippets so I can get the code highlighting which will be nice.

I also like that fish is supported and that it makes my shell commands look pretty.

The markdown processor:

https://github.com/russross/blackfriday

Here is a list of the supported languages in chroma, used by blackfriday to do the highlighting:

https://github.com/alecthomas/chroma

I use the dracula theme as I know what it looks like.