mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
---
|
||||
title: Creating a resource from template
|
||||
title: ExecuteAsTemplate
|
||||
linkTitle: Resource from Template
|
||||
description: Hugo Pipes allows the creation of a resource from an asset file using Go Template.
|
||||
date: 2018-07-14
|
||||
publishdate: 2018-07-14
|
||||
description: Creates a resource from a template
|
||||
categories: [asset management]
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: "pipes"
|
||||
parent: pipes
|
||||
weight: 80
|
||||
weight: 80
|
||||
sections_weight: 80
|
||||
signature: ["resources.ExecuteAsTemplate TARGET_PATH CONTEXT RESOURCE"]
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
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 target path, 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.
|
||||
|
||||
```go-html-template
|
||||
// assets/sass/template.scss
|
||||
|
Reference in New Issue
Block a user