mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
a3535c8486
a4fa0d1d6 Typos and grammatical changes 513884600 Add hugo pipes documentation git-subtree-dir: docs git-subtree-split: a4fa0d1d641b2b3e27a91ae8b1a0a29be3c42ddf
1.1 KiB
Executable file
1.1 KiB
Executable file
title | description | date | publishdate | lastmod | categories | keywords | menu | weight | sections_weight | draft | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SASS / SCSS | Hugo Pipes allows the processing of SASS and SCSS files. | 2018-07-14 | 2018-07-14 | 2018-07-14 |
|
|
02 | 02 | false |
Any SASS or SCSS file can be transformed into a CSS file using resources.ToCSS
which takes two arguments, the resource object and a map of options listed below.
{{ $sass := resources.Get "sass/main.scss" }}
{{ $style := $sass | resources.ToCSS }}
Options
- targetPath [string]
- If not set, the resource's target path will be the asset file original path with its extension replaced by
.css
. - outputStyle [string]
- Default is
nested
. Other available output styles areexpanded
,compact
andcompressed
. - precision [int]
- Precision of floating point math.
- enableSourceMap [bool]
- When enabled, a source map will be generated.
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}