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: FromString
linkTitle: Resource from String
linkTitle: Resource from string
description: Creates a resource from a string.
categories: [asset management]
keywords: []
menu:
docs:
parent: pipes
weight: 90
weight: 90
parent: hugo-pipes
weight: 110
weight: 110
signature: ["resources.FromString TARGET_PATH CONTENT"]
---
@@ -16,6 +16,8 @@ signature: ["resources.FromString TARGET_PATH CONTENT"]
It is possible to create a resource directly from the template using `resources.FromString` which takes two arguments, the target path for the created resource and the given content string.
The result is cached using the target path as the cache key.
The following example creates a resource file containing localized variables for every project's languages.
```go-html-template