hugo.Environment
文法
hugo.Environment
戻り値
string
The hugo.Environment function returns the current running environment as defined through the --environment command line flag.
{{ hugo.Environment }} → production
Command line examples:
| Command | Environment |
|---|---|
hugo |
production |
hugo --environment staging |
staging |
hugo server |
development |
hugo server --environment staging |
staging |