diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-08 17:56:42 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-08 17:56:42 +0300 |
commit | 1c7759028ed02170f128c1ede3b098e470803a26 (patch) | |
tree | a775c99a24f5bb63570ad5d8001f79031a2469d8 /docs/content/en/templates | |
parent | 35c88a7f907f20652e4e55697c0c438da0c4d57d (diff) | |
parent | 327aaed6d8ca57d8e5e3acb99ff53402ff1c556d (diff) |
Merge commit '327aaed6d8ca57d8e5e3acb99ff53402ff1c556d'
Diffstat (limited to 'docs/content/en/templates')
-rw-r--r-- | docs/content/en/templates/introduction.md | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/docs/content/en/templates/introduction.md b/docs/content/en/templates/introduction.md index 751ed3f29..801df71cc 100644 --- a/docs/content/en/templates/introduction.md +++ b/docs/content/en/templates/introduction.md @@ -107,19 +107,7 @@ The custom variables need to be prefixed with `$`. {{ $address := "123 Main St." }} {{ $address }} ``` - -{{% warning %}} -For Hugo v0.47 and older versions, variables defined inside `if` -conditionals and similar are not visible on the outside. -See [https://github.com/golang/go/issues/10608](https://github.com/golang/go/issues/10608). - -Hugo has created a workaround for this issue in [Scratch](/functions/scratch). -{{% /warning %}} - -For **Hugo v0.48** and newer, variables can be re-defined using the -new `=` operator (new in Go 1.11). - -Below example will work only in these newer Hugo versions. The example +Vriables can be re-defined using the `=` operator. The example below prints "Var is Hugo Home" on the home page, and "Var is Hugo Page" on all other pages: |