Debian Codegraph @

docs/content/en/quick-reference/glossary/environment.md

raw
1 ---
2 title: environment
3 ---
4
5 Typically one of `development`, `staging`, or `production`, each _environment_ may exhibit different behavior depending on configuration and template logic. For example, in a production environment you might minify and fingerprint CSS, but that probably doesn't make sense in a development environment.
6
7 When running the built-in development server with the `hugo server` command, the environment is set to `development`. When building your project with the `hugo build` command, the environment is set to `production`. To override the environment value, use the `--environment` command line flag or the `HUGO_ENVIRONMENT` environment variable.
8
9 To determine the current environment within a template, use the [`hugo.Environment`](/functions/hugo/environment/) function.