-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle Dart Sass into Hugo installation process #8299
Comments
We cannot (I'm probably sure about that) embed this into Hugo's binary (the embedded files in Go 1.16 is not executable). What we may consider (or: we should just do it, but nothing comes for free, it takes time) is to create "installables" (e.g. MSI on Windows) that would package this together and handling the PATH setup etc. We're already building deb packages for Linux and that should be possible to add. I think it then boils down to this issue: |
I see. Besides MSI and Linux deb packages, other package management tools (like homebrew) will need to update the installation process to include the Embedded Dart Sass in the future, I think. |
I do suspect that we need to consolidate the installation options at some point. I'm getting dizzy about the current situation. Re. brew we could have our own "brew tap" -- then we could build "everything" as part of the official release. |
Hello everyone. We recently started hitting a deprecation error in our Sass code and we try to migrate to Dart Sass only. But AFAICT Hugo needs an external binary file dependent on OS, so we can't move forward, because that would make things a lot more complicated. Just wondering if there's been any progress, thanks! |
Is it a deprecation ERROR or WARNING? Node SASS is supported until December 2022 and you should ignore or disable these warnings (if they are warnings) before you panic :) If it's errors then post your SASS code in the discourse and we try to make it compatible. |
You will, in general, notice it on the issue if there is a progress. |
It's warnings only, but they are quite noisy so we are looking at ways of moving forward: twbs/bootstrap#34051 |
How to install dart sass in hugo? I'm using ubuntu and brew in my system? |
@TenSketch Please use the forum (https://discourse.gohugo.io) for questions and troubleshooting. We prefer to use GitHub for verified bugs and vetted enhancements. Thanks. |
Dart SASS reached stable releases at Feb 01, 2022. The current version is 1.50 |
I have no idea how to simply and safely and for all platforms do this. Suggestions welcome, but please consier the 3 keywords simply and safely and for all platforms. |
It seems like dart doesn't even support musl (see: sass/dart-sass-embedded#85), so for all platforms seems to be an impossibility, since big distros like Alpine Linux use musl. |
I'm not sure I would call Alpine Linux a "big distro", but I get your point ... |
Since some days ago, Dart SASS embed has even ARM 32bit versions. I'm not sure, but I guess it covers all platforms of Hugo Extended. |
Still no support for various distros that use musl, such as Alpine Linux: sass/dart-sass-embedded#106 |
As to this particular issue, I guess what we practically could do is:
But I need to shift my focus away from this particular area for a little now, but I will return. |
I hope everything is fine, @bep ! Thank you! |
@robsonsobral sure, by focus shifting I meant just "away from software packaging" which is fun for a little ... |
As a data point, Hugo potentially breaks the moment someone uses modern CSS in SCSS, for example
And it's quite difficult for even moderately seasoned developers to remedy, as you can see in this thread, as the installation and configuration process for dart-sass-embedded isn't clear. Hugo's error message doesn't help
This link is a red herring, which strongly suggests that the current version isn't extended, and that installing the extended version will fix the issue.
If it's not a priority to package Hugo with an automatic installation of Embedded Dart Sass, I would encourage those with the know-how to correct the relevant documentation. |
@merchako I've created an issue in the docs repository. |
It's a high priority, but I just don't know how to do it. |
For Linux users, it is included in the Snap package. |
While DART doesn't support Alpine, there's nothing that can be done. So... |
@bep, I saw you apparently solve it for this person in the previously-reference thread. Unfortunately, there wasn't a lot of context about specifics, so it took me almost a day to figure out. Here's the gist of it: To make modern SASS work with Hugo
Does that help at all? I assume y'all know a whole lot more than me. Posting that outline would have made a huge difference, especially the specifics and links to the articles about appending the path. As a macOS user, I would absolutely love it if |
An update on the musl/alpine-linux situation; dart-sass-embedded is now available in the testing repository. |
Testing this out right now, and using dart-sass my sass files compile just fine, however using Hugo and dart-sass-embedded I get the following error:
The _typography.sass looks as follows: html, body
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
color: var(--text-color)
font-family: 'IM Fell English', serif
text-rendering: optimizeLegibility
h1
font-weight: 400
-webkit-hyphens: manual
i
font-size: 90%
font-style: italic
text-transform: lowercase I suspect |
@onodera-punpun I am unable to reproduce the problem using the indented Sass you posted.
Please use the forum (https://discourse.gohugo.io/) for questions and troubleshooting. We prefer to use GitHub for verified bugs and vetted enhancements. Thanks. |
Thanks! Posted it on the forum with more steps to reproduce this: https://discourse.gohugo.io/t/dart-sass-embedded-does-not-build-valid-sass-files/43184 |
Dart Sass Embedded github is now archived. Looks like they moved the embedded build into the primary Dart Sass repo. The current build of embedded works well currently but who knows how long that'll be. |
Embedded Dart Sass was deprecated in favor of Dart Sass. Hugo v0.114.0 and later are compatible with both Dart Sass (v1.63.4 and later) and Embedded Dart Sass (v1.62.1 and earlier). To install Dart Sass:
You may also install prebuilt binaries for Linux, macOS, and Windows. Run |
At this point I'm not sure it's worth spending any time on this. In my view, Hugo has three primary1 external dependencies: Git, Go, and Dart Sass. You can make the case that these are optional, but I'd estimate that (a) Git is required 99% of the time, (b) Go is currently required 30% of the time, and (c) Dart Sass is currently required 5% of the time. The Go and Dart Sass percentages will, obviously, increase over time. We don't bundle Git or Go, so why should we bundle Dart Sass?
I think any effort in this area should focus on package managers that provide Hugo installers: Homebrew, Chocolatey, and Scoop2. Each of these package managers have Dart Sass installers as well, so adding Dart Sass as a package dependency is, for the most part, trivial. This should be tracked as a separate issue, or elsewhere (forum). It would also be helpful if the primary CI/CD providers included Dart Sass in their base images, but installing Dart Sass during each build is fast, and again, somewhat trivial. Any lobbying345 we do should be tracked as a separate issue, or elsewhere (forum). Footnotes
|
No longer actionable. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
According to the documentation, Hugo seems to have a plan to bind the Embedded Dart Sass as the same as LibSass (Hugo extended). I expect that the improvement will be done at bep/godartsass with embed package known as a new feature in Go 1.16.
Is that possible? And, is there any plan to bind the Embedded Dart Sass into Hugo?
Related Links
The text was updated successfully, but these errors were encountered: