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