laozhu / hugo-nuo

🎨 A responsive light & clean hugo theme for blogger.
https://laozhu.me
MIT License
427 stars 150 forks source link

Compiling Sass #109

Closed BolajiAyodeji closed 5 years ago

BolajiAyodeji commented 5 years ago

Hello, this is more of a question than an Issue! What command do I need to run to compile my modified sass to css. I can't seem to modify styles, it's not rendering.

Does it compile when I run hugo or how? I tried making changes to the styles/custom.scss and then ran hugo to no avail.

Any suggestions, please?

laozhu commented 5 years ago

Hi @BolajiAyodeji, check your hugo version, maybe it's an old one, the hugo version after v0.43 supported hugo pipes and sass natively.

Hugo Pipes allows the processing of SASS and SCSS files

BolajiAyodeji commented 5 years ago

I am using the latest version v0.53

BolajiAyodeji commented 5 years ago

But normally when I run hugo, it ought to compile automatically right? I don't seem to understand

laozhu commented 5 years ago

Have you uncommented this line in your config.toml?

# customStyle = "styles/custom.scss"
BolajiAyodeji commented 5 years ago

No, I just did that and ran hugo I got this error

Building sites … ERROR 2019/01/29 15:35:10 error: failed to transform resource:TOCSS: failed to transform "styles/custom.scss" (text/x-scss): this feature is not available in your current Hugo version
Total in 95 ms
Error: Error building site: logged 1 error(s)

what is wrong? I have the latest version, I downloaded it from GitHub, v0.53

BolajiAyodeji commented 5 years ago

See

 hugo version
Hugo Static Site Generator v0.53-8FC339DC2529FF77E494A1C12CD1FF9FBCB880A4 windows/amd64 BuildDate: 2018-12-24T08:26:16Z
laozhu commented 5 years ago

@BolajiAyodeji I know what's the problem, you should download the extended hugo version which contains sass module.

Below is my hugo version:

~/D/@/my-blog ❯❯❯ hugo version
Hugo Static Site Generator v0.53/extended darwin/amd64 BuildDate: unknown
laozhu commented 5 years ago

https://github.com/gohugoio/hugo/releases

The last one is the extended version.

BolajiAyodeji commented 5 years ago

I just did that, it worked! Thanks a lot

BolajiAyodeji commented 5 years ago

I have another issue with images, should I ask here or open a new issue?

laozhu commented 5 years ago

@BolajiAyodeji Open another one for discussion.