HUGO
Menu
GitHub 89803 stars Mastodon

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 }} → production

Command line examples:

CommandEnvironment
hugo buildproduction
hugo build --environment stagingstaging
hugo serverdevelopment
hugo server --environment stagingstaging