mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '766085c2dc6fc95ac30fda2a9ebde2355fc12554'
This commit is contained in:
@@ -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
|
||||
|
@@ -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 }}
|
||||
```
|
||||
```
|
||||
|
Reference in New Issue
Block a user