Merge commit '766085c2dc6fc95ac30fda2a9ebde2355fc12554'

This commit is contained in:
Bjørn Erik Pedersen
2018-08-01 10:01:49 +02:00
32 changed files with 128 additions and 62 deletions

View File

@@ -43,7 +43,7 @@ For improved readability, the Hugo Pipes examples of this documentation will be
### Method aliases
Each Hugo Pipes `resources` transformation method uses a __camelCased__ alias (`toCSS` for `resources.ToCSS`).
Non-transformation methods deprived of such aliases are `resources.Get`, `resources.FromString` and `resources.ExecuteAsTemplate`.
Non-transformation methods deprived of such aliases are `resources.Get`, `resources.FromString`, `resources.ExecuteAsTemplate` and `resources.Concat`.
The example above can therefore also be written as follows:
```go-html-template

View File

@@ -36,7 +36,10 @@ precision [int]
enableSourceMap [bool]
: When enabled, a source map will be generated.
includePaths [string slice]
: Additional SCSS/SASS include paths. Paths must be relative to the project directory.
```go-html-template
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "node_modules/myscss")) }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
```
```