diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-11-24 14:11:42 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-11-25 20:34:34 +0100 |
commit | 7e223b3baaef68d6e6f99e28f162362c81deffba (patch) | |
tree | f518b27251b0cbd6cbd8fb1ba8f1ffbb419b6785 /docs | |
parent | 8a6e70605350255920100c5c085bb9ea6576d972 (diff) |
Allow setting the delimiter used for setting config via OS env, e.g. HUGO_
Fixes #7829
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/en/getting-started/configuration.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index fda7e2327..d12ecdf3b 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/content/en/getting-started/configuration.md @@ -427,6 +427,8 @@ Names must be prefixed with `HUGO_` and the configuration key must be set in upp To set config params, prefix the name with `HUGO_PARAMS_` {{% /note %}} +{{< new-in "0.79.0" >}} If you are using snake_cased variable names, the above will not work, so since Hugo 0.79.0 Hugo determines the delimiter to use by the first character after `HUGO`. This allows you to define environment variables on the form `HUGOxPARAMSxAPI_KEY=abcdefgh`, using any [allowed](https://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names#:~:text=So%20names%20may%20contain%20any,not%20begin%20with%20a%20digit.) delimiter. + {{< todo >}} Test and document setting params via JSON env var. {{< /todo >}} |