github.com/rabbouni145/gg@v0.47.1/docs/content/en/functions/getenv.md (about) 1 --- 2 title: getenv 3 description: Returns the value of an environment variable. 4 godocref: 5 date: 2017-02-01 6 publishdate: 2017-02-01 7 lastmod: 2017-02-01 8 categories: [functions] 9 menu: 10 docs: 11 parent: "functions" 12 keywords: [] 13 signature: ["getenv VARIABLE"] 14 workson: [] 15 hugoversion: 16 relatedfuncs: [] 17 deprecated: false 18 aliases: [] 19 --- 20 21 Takes a string containing the name of the variable as input. Returns 22 an empty string if the variable is not set, otherwise returns the 23 value of the variable. 24 25 ``` 26 {{ getenv "HOME" }} 27 ``` 28 29 {{% note %}} 30 In Unix-like environments, the variable must also be exported in order to be seen by `hugo`. 31 {{% /note %}}