mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 06:17:45 +00:00
Clarify caching for resources.FromString (#2120)
This commit is contained in:
1 parent
5bf2fef6d2
commit
60c23920bd
1 file changed
+2
@@ -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.
|
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.
|
The following example creates a resource file containing localized variables for every project's languages.
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
|
|||||||
Reference in new issue
Block a user