Files
hugo/docs/content/en/methods/site/Role.md
T
Bjørn Erik Pedersen 30a20122b7 Merge commit '8f3c066d23f431fb2c53d97ea489e4c28b42bd82'
# Conflicts:
#	docs/data/docs.yaml
2026-02-14 12:14:33 +01:00

830 B

title, description, categories, keywords, params
title description categories keywords params
Role Returns the role object for the given site.
functions_and_methods
returnType signatures
roles.RoleSite
SITE.Role

{{< new-in 0.153.0 />}}

The Role method on a Site object returns the role object for the given site. The role object is derived from the role definition in the site configuration.

Methods

IsDefault

(bool) Reports whether this is the default role object as defined by the defaultContentRole setting in the site configuration.

{{ .Site.Role.IsDefault }} → true

Name

(string) Returns the role name. This is the lower cased key from the site configuration.

{{ .Site.Role.Name }} → guest