From 120a61a474c56a56522ae486ddeaf86567246688 Mon Sep 17 00:00:00 2001 From: Marcel Overdijk Date: Thu, 12 Nov 2020 08:47:05 +0100 Subject: [PATCH] Fixed wrong var assignment example --- content/en/hugo-pipes/resource-from-string.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/hugo-pipes/resource-from-string.md b/content/en/hugo-pipes/resource-from-string.md index 862fcd930..8b942d2f3 100755 --- a/content/en/hugo-pipes/resource-from-string.md +++ b/content/en/hugo-pipes/resource-from-string.md @@ -21,7 +21,7 @@ It is possible to create a resource directly from the template using `resources. The following example creates a resource file containing localized variables for every project's languages. ```go-html-template -{{ $string := (printf "var rootURL: '%s'; var apiURL: '%s';" (absURL "/") (.Param "API_URL")) }} +{{ $string := (printf "var rootURL = '%s'; var apiURL = '%s';" (absURL "/") (.Param "API_URL")) }} {{ $targetPath := "js/vars.js" }} {{ $vars := $string | resources.FromString $targetPath }} {{ $global := resources.Get "js/global.js" | resources.Minify }}