hugo.Environment
Returns the current running environment.
Syntax
hugo.Environment
Returns
string
The hugo.Environment function returns the current running environment as defined through the --environment command line flag.
{{ hugo.Environment }} → productionCommand line examples:
| Command | Environment |
|---|---|
hugo | production |
hugo --environment staging | staging |
hugo server | development |
hugo server --environment staging | staging |
Last updated:
March 5, 2025
:
content: Remove "related" array from function and method pages (2fcd21ee5)
Improve this page