Make use of the fact that Hugo sets enviroment to development when running hugo server.
This commit is contained in:
parent
76b063b637
commit
19887185c7
2 changed files with 3 additions and 5 deletions
|
|
@ -233,11 +233,9 @@ To customise a js or sass file, copy it to the root assets directory and edit it
|
||||||
|
|
||||||
The default styles in "_zen.scss" are boring but functional. You can easily overide them completely by placing an empty file named "_zen.scss" in root assets/sass directory.
|
The default styles in "_zen.scss" are boring but functional. You can easily overide them completely by placing an empty file named "_zen.scss" in root assets/sass directory.
|
||||||
|
|
||||||
By default the sass files are built for production, compressed with fingerprint. By setting the Hugo enviroment variable to "dev" they will instead be nested with sourcemaps.
|
The sass files are be default built for production, compressed with fingerprint.
|
||||||
|
|
||||||
```
|
By setting the Hugo environment variable to "development" (default when running `hugo server`) they will instead be nested with sourcemaps.
|
||||||
§ hugo serve watch --environment=dev
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Multilingual
|
## Multilingual
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
{{ $main_style := resources.Get "sass/styles.scss" | toCSS $main_options | fingerprint -}}
|
{{ $main_style := resources.Get "sass/styles.scss" | toCSS $main_options | fingerprint -}}
|
||||||
{{ $mobile_style := resources.Get "sass/mobile.scss" | toCSS $mobile_options | fingerprint -}}
|
{{ $mobile_style := resources.Get "sass/mobile.scss" | toCSS $mobile_options | fingerprint -}}
|
||||||
{{ $print_style := resources.Get "sass/print.scss" | toCSS $print_options | fingerprint -}}
|
{{ $print_style := resources.Get "sass/print.scss" | toCSS $print_options | fingerprint -}}
|
||||||
{{ if eq hugo.Environment "dev" -}}
|
{{ if eq hugo.Environment "development" -}}
|
||||||
{{ $main_options = (dict "targetPath" "css/styles.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
{{ $main_options = (dict "targetPath" "css/styles.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||||
{{ $mobile_options = (dict "targetPath" "css/mobile.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
{{ $mobile_options = (dict "targetPath" "css/mobile.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||||
{{ $print_options = (dict "targetPath" "css/print.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
{{ $print_options = (dict "targetPath" "css/print.css" "outputStyle" "nested" "enableSourceMap" true "includePaths" (slice "assets/lib/typey/stylesheets")) -}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue