No this is something the Hugo folks have

No, this is something the Hugo folks have been trying to fix for a couple of years now but haven’t yet arrived at a solution that satisfies all their requirements. That’s why I was so excited about v2 including the Embedded Dart Sass binary. With the changes announced in the blog post, having the regular Dart Sass binary in the PATH now accomplishes the same thing. It’s just a matter of making sure to use that binary rather than the now-archived Embedded Dart Sass binary. @johndotawesome the difference between Hugo and Hugo Extended where Sass is concerned is that Hugo Extended supports the use of Sass, while “regular” Hugo (an oddity of the Hugo build process for a very small number of OS versions) does not. At one time, Hugo Extended did come with the old/deprecated Libsass, but it’s never included Embedded Dart Sass.
12 Replies
JohnDotAwesome
If we detect a sass version, we can pull a binary from https://github.com/sass/dart-sass/releases
GitHub
Releases · sass/dart-sass
The reference implementation of Sass, written in Dart. - sass/dart-sass
JohnDotAwesome
Hrmm I thought it would carry over the full reply history into the thread. Oh well
Bryce Wray
Bryce WrayOP2y ago
As noted in the general discussion — suggest calling it DART_SASS_VERSION to avoid possible confusion with the Node.js package. Once you have it set up, if you need somebody to test it with a Hugo repo, let me know and I’ll switch my current env var for Sass to whatever name you choose to give it, then run a build to see what happens. @johndotawesome I learned the hard way that the current Dart Sass binary (1.62.1) doesn’t yet support Embedded Dart Sass fully (e.g., it doesn't “watch” files properly for when you edits .scss files), so please keep the current/archived Embedded Dart Sass binary (also 1.62.1) in the v2 build until there’s a newer Dart Sass release that does provide this support. (This is despite the fact that they’ve already changed the Dart Sass README to say that commands such as sass --embedded and sass --embedded --version will work; they don’t with the current Dart Sass binary — which makes sense, given that 1.62.1 was released weeks before the Sass team made this change.)
JohnDotAwesome
As usual, thank you so much for the info! I'll keep that in mind.
Bryce Wray
Bryce WrayOP2y ago
Further info — while Dart Sass 1.63.x (released yesterday) does include the Embedded Dart Sass packaging I mentioned a few days ago, it doesn’t work with Hugo like the previous packaging did. So, until Hugo can be updated to work around that (see https://discourse.gohugo.io/t/sass-blog-post-embedded-dart-sass-breaking-changes-coming/44489/6), please keep the current/archived Embedded Dart Sass binary (1.62.1) on v2 and accessible via EMBEDDED_DART_SASS_VERSION, as now. Thanks! 🙏 I’ll let you know when/if this changes. (You may still want to include the Dart Sass binary as well; just sayin’ that the current/archived EDS needs to remain, for now, for Hugo purposes.)
JohnDotAwesome
👌
Bryce Wray
Bryce WrayOP2y ago
The Hugo team is working on it — just don’t know when the fix will be in.
JohnDotAwesome
No problem at all. These sorts of things are much easier to maintain/add/remove in the v2 image
Bryce Wray
Bryce WrayOP2y ago
Just FYI, Hugo 0.114.0 (https://github.com/gohugoio/hugo/releases/tag/v0.114.0) was released today, and it now works with the Dart Sass binary, accessing Embedded Dart Sass from within. So, as long as a CFPages/Hugo user now can specify DART_SASS_VERSION in v2 (the current version is 1.63.4, https://github.com/sass/dart-sass/releases/tag/1.63.4), all is good to go. To reiterate and/or expand on my earlier info on this subject: those using Hugo versions older than 0.114.0 will still have to use the older, now-archived, separate Embedded Dart Sass binary (1.62.1, https://github.com/sass/dart-sass-embedded/releases/tag/1.62.1); so you'll want to keep that one still available, too, and accessible via EMBEDDED_DART_SASS_VERSION, as before. With any luck at all, I won’t have to trouble you about this again! 😄 ...but I wanted to bring you up to date, as previously promised.
JohnDotAwesome
As always, I really appreciate the info! I'll try to get dart sass setup over the next couple of weeks
Bryce Wray
Bryce WrayOP2y ago
TY! Should be pretty much like EmbDartSass — just a binary, but a different one.
JohnDotAwesome
Yup yup. I there isn't an asdf plugin already, it was pretty darn easy to build one for the embedded binary
Want results from more Discord servers?
Add your server