From 5d910e24d24a30b7d1cbd29b913f06b959ffe614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 28 Apr 2022 20:21:58 +0200 Subject: [PATCH] Update introduction.md --- content/en/templates/introduction.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 751ed3f29..801df71cc 100644 --- a/content/en/templates/introduction.md +++ b/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: