Merge commit '9f1265fde4b9ef186148337c99f08601633b6056'

This commit is contained in:
Bjørn Erik Pedersen
2020-11-27 09:30:05 +01:00
20 changed files with 66 additions and 661 deletions

View File

@@ -21,7 +21,7 @@ It is possible to create a resource directly from the template using `resources.
The following example creates a resource file containing localized variables for every project's languages.
```go-html-template
{{ $string := (printf "var rootURL: '%s'; var apiURL: '%s';" (absURL "/") (.Param "API_URL")) }}
{{ $string := (printf "var rootURL = '%s'; var apiURL = '%s';" (absURL "/") (.Param "API_URL")) }}
{{ $targetPath := "js/vars.js" }}
{{ $vars := $string | resources.FromString $targetPath }}
{{ $global := resources.Get "js/global.js" | resources.Minify }}