Merge commit '87de22d7464e239c775fbd48ebce1665d5b1e80d'

This commit is contained in:
Bjørn Erik Pedersen
2023-07-29 11:17:28 +02:00
177 changed files with 1623 additions and 1556 deletions

View File

@@ -1,14 +1,14 @@
---
title: ExecuteAsTemplate
linkTitle: Resource from Template
linkTitle: Resource from template
description: Creates a resource from a template
categories: [asset management]
keywords: []
menu:
docs:
parent: pipes
weight: 80
weight: 80
parent: hugo-pipes
weight: 120
weight: 120
signature: ["resources.ExecuteAsTemplate TARGET_PATH CONTEXT RESOURCE"]
---
@@ -16,7 +16,7 @@ signature: ["resources.ExecuteAsTemplate TARGET_PATH CONTEXT RESOURCE"]
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 target path for the created resource, the template context, and the resource object.
The function takes three arguments: the target path for the created resource, the template context, and the resource object. The target path is used to cache the result.
```go-html-template
// assets/sass/template.scss