Debian Codegraph @

docs/content/en/configuration/roles.md

raw
1 ---
2 title: Configure roles
3 linkTitle: Roles
4 description: Configure roles.
5 categories: []
6 keywords: []
7 ---
8
9 {{< new-in 0.153.0 />}}
10
11 This is the default configuration:
12
13 {{< code-toggle config=roles />}}
14
15 ## Settings
16
17 Use the following setting to define how Hugo orders roles.
18
19 `weight`
20 : (`int`) The role [weight](g).
21
22 ## Sort order
23
24 Hugo sorts roles by weight in ascending order, then lexicographically in ascending order. This affects build order and complement selection.
25
26 ## Example
27
28 The following configuration demonstrates how to define multiple roles with specific weights.
29
30 {{< code-toggle >}}
31 [roles.guest]
32 weight = 20
33 [roles.member]
34 weight = 10
35 {{< /code-toggle >}}