Back to Hugo

Syntax highlighting styles

docs/content/en/quick-reference/syntax-highlighting-styles.md

0.161.1935 B
Original Source

Overview

Hugo provides several methods to add syntax highlighting to code examples:

Regardless of method, use any of the syntax highlighting styles below.

Set the default syntax highlighting style in your project configuration:

{{< code-toggle file=hugo >}} [markup.highlight] style = 'monokai' {{< /code-toggle >}}

See configure Markup.

Styles

This gallery demonstrates the application of each syntax highlighting style with code examples written in different programming languages.

{{% syntax-highlighting-styles %}}