Hugo - Syntax Highlighting
Published: Hugo Estimated reading time: ~1 minutes
In order to get fancy higlighting like this:
SELECT * FROM TBL_1
GO
Console.Writeline("Hello World");
You either need to use the Highlight Shortcode or enable code fences in the configuration file.
Add this line
pygmentsCodeFences = true
To config.toml
To be able to use something like
```sql
-- My code here
```
to wrap code syntax.
Alternatively, with the Highlight Shortcode you can do something like this:
{{< highlight sql "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
SELECT * FROM TBL_1
GO
{{< / highlight >}}
Which results in this:
SELECT * FROM TBL_1
GO