Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'

This commit is contained in:
Bjørn Erik Pedersen
2023-05-22 16:47:07 +02:00
341 changed files with 3107 additions and 4238 deletions

View File

@@ -1,20 +1,13 @@
---
title: getenv
description: Returns the value of an environment variable, or an empty string if the environment variable is not set.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2021-11-26
categories: [functions]
menu:
docs:
parent: "functions"
parent: functions
keywords: []
signature: ["os.Getenv VARIABLE", "getenv VARIABLE"]
workson: []
hugoversion:
relatedfuncs: []
deprecated: false
aliases: []
---
Examples:
@@ -43,4 +36,3 @@ And then retrieve the values within a template:
```
With Hugo v0.91.0 and later, you must explicitly allow access to environment variables. For details, review [Hugo's Security Policy](/about/security-model/#security-policy). By default, environment variables beginning with `HUGO_` are allowed when using the `os.Getenv` function.