Skip to content
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

Use Dart Sass #8

Merged
merged 2 commits into from
Apr 12, 2020
Merged

Use Dart Sass #8

merged 2 commits into from
Apr 12, 2020

Conversation

Flogex
Copy link
Owner

@Flogex Flogex commented Apr 12, 2020

Hugo Pipes uses LibSass, but it is not fully compatible with the latest Sass specification and does lack features like the new module system. I used Hugo Pipes to convert SCSS to CSS and to add Subresource Integrity (SRI).

Dart Sass is now used to process the .scss files. It runs in the build pipeline after Hugo. Hugo moves all files and folders in the static directory to the output directory. Dart Sass processes the content of the [outputDir]/style directory and removes all .scss files afterwards.

Currently, all .scss files are processed, but this does only take up a few more bytes on the server — the browser will only download the .css files it needs.

I removed SRI. Honestly, I only used it because it was so easy to add. Because I'm currently not using a CDN and SRI can sometimes lead to problems (it was with caching, if I remember correctly), I will not add it again in the near future.

Florian Gerlinghoff added 2 commits April 11, 2020 17:58
Í moved all .scss files to the 'static' directory. Dart Sass must be
used to convert these files to CSS.

The scssLink partial does not use Hugo Pipes anymore, but does only
generate a link to the .css file.

Hugo Pipes uses LibSass, which currently does not support the new module
system of SASS.
@Flogex Flogex merged commit 437b07a into master Apr 12, 2020
@Flogex Flogex deleted the use-dart-sass branch April 12, 2020 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant