Back to Hugo

hugo.Environment

docs/content/en/functions/hugo/Environment.md

0.164.0395 B
Original Source

The hugo.Environment function returns the current running environment as defined through the --environment command line flag.

go-html-template
{{ hugo.Environment }} → production

Command line examples:

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