Back to Hugo

Configure roles

docs/content/en/configuration/roles.md

0.161.1565 B
Original Source

{{< new-in 0.153.0 />}}

This is the default configuration:

{{< code-toggle config=roles />}}

Settings

Use the following setting to define how Hugo orders roles.

weight : (int) The role weight.

Sort order

Hugo sorts roles by weight in ascending order, then lexicographically in ascending order. This affects build order and complement selection.

Example

The following configuration demonstrates how to define multiple roles with specific weights.

{{< code-toggle >}} [roles.guest] weight = 20 [roles.member] weight = 10 {{< /code-toggle >}}