Migrating to Dart Sass

LibSass is deprecated a long time ago, it is time to migrate to Dart Sass.

How to Migrate to Dart Sass?

Since the Dart Sass isn’t included into Hugo binary, you’ve to install it on your environment first, and upgrade modules, then rebuild sites.

If there is any errors, please report to us via GitHub Discussions.

Dart Sass Warnings?

You may see some warnings from Dart Sass, it has been fixed in Bootstrap, but not release yet, to fix it, you’ll need to upgrade Bootstrap to latest dev version.

1hugo mod get github.com/twbs/bootstrap@main

How to Keep Using LibSass?

If you don’t have time to do it or do not care about this, you can set the following parameters as libsass, to keep using LibSass.

  1. hb.sass_transpiler - HB Framework Core Module, required.
  2. search.sass_transpiler - Search Module, optional.
  3. decap_cms.sass_transpiler - Decap CMS Module, optional.
  4. swagger_ui.sass_transpiler - Swagger UI Module, optional.
razonyang
Monday, September 16, 2024 Thursday, August 22, 2024