Error Hugo variable inside Sass

Hi all I’m using bulma and trying to add some hugo variable inside the sass modul, in this case is theme primary color

my env Windows10 using go version go1.11 windows/amd64 and Hugo Static Site Generator v0.50/extended windows/amd64 BuildDate: unknown


  theme_color = "#EC1164"
           └─── initial-variable.sass #Some Hugo variable here

trying add new color theme inside initial-variable.sass

$pink:         {{ .Site.Params.theme_color }}

the output error

e[?25lBuilding sites … e[1;31mERRORe[0m 2018/11/07 15:14:21 error: failed to transform resource: SCSS processing failed: file "E:/YUDY/WEB PROJECT/TIAVI/sites/newdev/assets/assets/css/sass/utilities/initial-variables.sass", line 25, col 7: Invalid CSS after "$pink:": expected 1 selector or at-rule, was "{{ .Site.Params.the"
e[KTotal in 44 ms
Error: Error building site: logged 1 error(s)

the repo

any help would be greatly appreciated

You need to read this:

1 Like

Good explanations here:

and here:

1 Like

thank you guys execute as template is working now after i move hugo variabe from sass/initial-variable.sass to bulma.sass

@charset "utf-8"

$pink:  {{ .Param "theme_color" }}

/*! v0.7.2 | MIT License | */
@import "sass/utilities/_all"
@import "sass/base/_all"
@import "sass/elements/_all"
@import "sass/components/_all"
@import "sass/grid/_all"
@import "sass/layout/_all"

but i’m still curious why the variable failed if I put inside the module?

1 Like