From 17fae284c17ee784a615f00a46435b4d6daf8c91 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Wed, 31 Mar 2021 15:27:25 -0700 Subject: [PATCH] Fix resources.ExecuteAsTemplate argument order (#1394) Co-authored-by: kjirou --- content/en/hugo-pipes/resource-from-template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/hugo-pipes/resource-from-template.md b/content/en/hugo-pipes/resource-from-template.md index 317630b40..9bc8c7e9d 100755 --- a/content/en/hugo-pipes/resource-from-template.md +++ b/content/en/hugo-pipes/resource-from-template.md @@ -18,7 +18,7 @@ draft: false In order to use Hugo Pipes function on an asset file containing Go Template magic the function `resources.ExecuteAsTemplate` must be used. -The function takes three arguments, the resource object, the resource target path and the template context. +The function takes three arguments: the resource target path, the template context, and the resource object. ```go-html-template // assets/sass/template.scss @@ -35,4 +35,4 @@ body{ ```go-html-template {{ $sassTemplate := resources.Get "sass/template.scss" }} {{ $style := $sassTemplate | resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS }} -``` \ No newline at end of file +```