Coming Soon: SASS support and more

3 Likes

/cc @regis

I was pleasently surprised to test this and it … just worked.

6 Likes

This is going the ā€œcheck solvedā€ many threads! Thanks for making this a very near future reality.

Hey gang,

You have a final chance to look at all the new functions coming and suggest some final adjustments – or just look:

3 Likes

I managed to find a way to get LiveReload ā€œhot reloadingā€ working for these assets changes. This avoids browser reloads and makes it lot snappier. I will probably only enable in ā€œfast render modeā€ (because it requires hashing of the published content to detect changes). I will test a little more, but it is very very cool. Works wonder for images, CSS (that can be built from SCSS) and JS.

10 Likes

wow, fantastic!

This new feature set just keeps getting better and better! I can’t wait to install and give it a test run!

Oh my …

9 Likes

Alexa: Drum roll!

This is awesome! Quick question tho, where do you set the EnableSourceMap boolean?

1 Like

Perfect. Thanks!

I just had to give it a try on my mac and android phone (aarch64). The hugo install process gave me the same two wellington/go-libsass warnings on both systems, but it worked nonetheless. I tested only a few simple things (toCSS | minify | fingerprint). Serving and reloading is as fast as one would expect :smile:. I am really looking forward to not having to use nodesass anymore.

2 Likes

Yes, those are known. I will look into that, but I have used this extensively the last few weeks and have had no SASS-related issues.

2 Likes

I’m on v0.43-DEV darwin/amd64 but get this error when using toCSS
failed to transform resource: failed to transform "sass/main.scss" (text/x-scss): this feature is not available in your current Hugo version

I guess I need help :frowning: It is mentionned needing a C compiler, but I thought it was only when building from source.

There is no relase builds, so you, by definition, have to build it from source … or get a binary from someone who built it from source.

If you have XCode installed (which would give you the C compiler), try:

HUGO_BUILD_TAGS=extended mage install

If you still have problems, send me a PM.

Eureka! It works. :smile:

Had a bit of a struggle to get everything compiling and linking, but, it appears to basically be working fine now.

Super!

I can set the $moo variable in _customvars.scss and boom, it updates the site.
I can see how changing the Hugo Pipes pipeline in baseof.html works to change how the css is compiled and minified etc.

Really cool.

1 Like

already tested from the source, well i must say this is AMAZING :heart_eyes:

my favorite thing actually resources.FromString :heart_eyes: combined with resources.Concat
really nice, now i can output anything i want :sunglasses:

Thanks to @bep and all contributors :+1::+1::+1:

2 Likes

I added that mainly to make it easier to write tests for all of this … but I assumed it was going to be useful for some.

2 Likes

I refactored the website for my recent book to use the new version:

I pulled up @bep’s example project, spent about 5 minutes working on syntax, and I was good to go. Love at first sight. Bam.

PS: Hugo + Netlify + Bulma CSS is fucking deadly, y’all.

4 Likes