mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -4,8 +4,6 @@ title: environment
|
||||
|
||||
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.
|
||||
|
||||
When running the built-in development server with the `hugo server` command, the environment is set to `development`. When building your site with the `hugo` command, the environment is set to `production`. To override the environment value, use the `--environment` command line flag or the `HUGO_ENVIRONMENT` environment variable.
|
||||
When running the built-in development server with the `hugo server` command, the environment is set to `development`. When building your site with the `hugo` command, the environment is set to `production`. To override the environment value, use the `--environment` command line flag or the `HUGO_ENVIRONMENT` environment variable.
|
||||
|
||||
To determine the current environment within a template, use the [`hugo.Environment`] function.
|
||||
|
||||
[`hugo.Environment`]: /functions/hugo/environment/
|
||||
To determine the current environment within a template, use the [`hugo.Environment`](/functions/hugo/environment/) function.
|
||||
|
Reference in New Issue
Block a user