Summary
The site depends on the sassc gem (pulled in by jekyll-sass-converter 2.x). The sassc gem includes a native C++ extension that must be compiled from source during bundle install, which takes 1-2 minutes and is the single biggest bottleneck in local site setup and CI gem installation.
Suggestion
Switch to Dart Sass via the sass-embedded gem. The cleanest way is to bump jekyll-sass-converter to ~> 3.0: it dropped sassc in favor of sass-embedded in v3.0.0. (Note: there is no jekyll-sass-embedded gem.) Dart Sass ships prebuilt platform-specific binaries, so installation completes in seconds with no native compilation step.
Benefits
- Faster local setup: Eliminates the sassc native extension compilation (~1-2 min savings per fresh
bundle install)
- Faster CI builds: Same benefit applies to CI pipelines that install gems from scratch
- Better Sass compatibility: Dart Sass is the primary Sass implementation and receives new features first. LibSass (which sassc wraps) has been deprecated since 2020.
- Simpler build dependencies: No C/C++ compiler toolchain needed for gem installation
Current state
The Gemfile already pins Jekyll 4.4.1 and an explicit converter:
gem "jekyll", "~> 4.4.1"
gem "jekyll-sass-converter", "~> 2.0"
Jekyll 4.4.1 already allows jekyll-sass-converter (>= 2.0, < 4.0), so no Jekyll bump is needed.
Switching involves:
- Bumping the converter pin:
gem "jekyll-sass-converter", "~> 3.0"
- Regenerating
Gemfile.lock and adding the CI platform: bundle lock --add-platform x86_64-linux (sass-embedded is a platform-specific gem; CI runs on ubuntu-latest)
- Fixing one SCSS file that Dart Sass rejects (see Notes), then verifying the build
Notes
- LibSass has been deprecated since October 2020, so this is also a move toward a supported Sass compiler.
- Behavioral difference that requires a code fix: LibSass compiled imported
.css files as Sass; Dart Sass treats .css as plain CSS. _sass/includes/brand.css uses Sass variables ($white, $black, $breakpoint-m), so Dart Sass fails with "Sass variables aren't allowed in plain CSS." Renaming it to _sass/includes/brand.scss fixes it (the @import "includes/brand" is unchanged).
- Dart Sass also logs deprecation warnings for
@import and global color functions like darken(). These do not break the build (removal is slated for Dart Sass 3.0); migrating to @use/@forward and color.adjust() is a reasonable cleanup to bundle in.
Summary
The site depends on the
sasscgem (pulled in byjekyll-sass-converter2.x). The sassc gem includes a native C++ extension that must be compiled from source duringbundle install, which takes 1-2 minutes and is the single biggest bottleneck in local site setup and CI gem installation.Suggestion
Switch to Dart Sass via the
sass-embeddedgem. The cleanest way is to bumpjekyll-sass-converterto~> 3.0: it droppedsasscin favor ofsass-embeddedin v3.0.0. (Note: there is nojekyll-sass-embeddedgem.) Dart Sass ships prebuilt platform-specific binaries, so installation completes in seconds with no native compilation step.Benefits
bundle install)Current state
The
Gemfilealready pins Jekyll 4.4.1 and an explicit converter:Jekyll 4.4.1 already allows
jekyll-sass-converter (>= 2.0, < 4.0), so no Jekyll bump is needed.Switching involves:
gem "jekyll-sass-converter", "~> 3.0"Gemfile.lockand adding the CI platform:bundle lock --add-platform x86_64-linux(sass-embeddedis a platform-specific gem; CI runs onubuntu-latest)Notes
.cssfiles as Sass; Dart Sass treats.cssas plain CSS._sass/includes/brand.cssuses Sass variables ($white,$black,$breakpoint-m), so Dart Sass fails with "Sass variables aren't allowed in plain CSS." Renaming it to_sass/includes/brand.scssfixes it (the@import "includes/brand"is unchanged).@importand global color functions likedarken(). These do not break the build (removal is slated for Dart Sass 3.0); migrating to@use/@forwardandcolor.adjust()is a reasonable cleanup to bundle in.