mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit '07b8d9466dfb59c429c1b470a0443337bc0aeefe'
This commit is contained in:
@@ -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 }}
|
||||
```
|
||||
```
|
||||
|
Reference in New Issue
Block a user