How to add a function of syntax highlight to Hugo blog
This article explains how to add a function of syntax highlight on Hugo blog.
This article explains how to add a function of syntax highlight on Hugo blog.
The following lists are the table of contents about this article.
Target audience
- Those who want to add a function of syntax highlight on Hugo blog.
Environment
- Hugo 0.57.2
- Hugo-extended 0.58.2
Preconditions
- Installed Hugo and Hugo-extended
Add a function of syntax highlight
Add the following codes to config.toml.
pygmentsCodefences = true
pygmentsStyle = "fruity"
You can chose a style on pygmentsStyle from the below pages.
xxxxxxxxxx
The above code chooses style that is “fruity”.