diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 8dd863e..91fa52c 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -18,6 +18,10 @@ env: # SHA256 of the above tarball, pinned at download time. Update alongside # LYCHEE_VERSION_TAG whenever the binary is upgraded. LYCHEE_SHA256: "1f4e0ef7f6554a6ed33dd7ac144fb2e1bbed98598e7af973042fc5cd43951c9a" + DART_SASS_VERSION: 1.99.0 + # SHA256 of `dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz`, from the GitHub release. + # Update alongside DART_SASS_VERSION. + DART_SASS_SHA256: "f0a32ab99bc0a1eb62ea7140a056a1bca82d534390b7c3dba4f2016eb0077753" # Force Hugo to write its module cache where the cache step actually # restores from. Hugo's default on Linux is `~/.cache/hugo_cache` # (or `$TMPDIR/hugo_cache_$USER`), neither of which matches the @@ -79,6 +83,21 @@ jobs: hugo-version: ${{ env.HUGO_VERSION }} extended: true + - name: Install Dart Sass + if: steps.docs.outputs.present == 'true' + run: | + archive="dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" + curl -fsSLO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/${archive}" + echo "${DART_SASS_SHA256} ${archive}" | sha256sum --check --strict + tar -xzf "${archive}" -C "${RUNNER_TEMP}" + rm "${archive}" + echo "${RUNNER_TEMP}/dart-sass" >> "${GITHUB_PATH}" + + # Hugo finds Dart Sass on `PATH`. `hugo env` lists it when it does. + - name: Check Dart Sass + if: steps.docs.outputs.present == 'true' + run: hugo env | grep 'github.com/sass/dart-sass' + # `actions/setup-node@v4` ships with built-in npm caching that hashes # the lockfile and restores `~/.npm`. We use that instead of a # standalone `actions/cache@v4` block so there is only one source of diff --git a/README.md b/README.md index ddc12df..0478ea6 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,14 @@ are working as intended. It allows making changes more convenient for authors. 2. [Go][go] `1.27.3` or newer (matches `docs/_preview/go.mod`). 3. [Node.js][nodejs] `18+`. 4. [Hugo Extended][hugo-quick-start] in version `v0.169.0` or higher. +5. [Dart Sass][dart-sass] in version `1.99.0` or higher. On macOS, install it with Homebrew: + + ```shell + brew install sass/sass/sass + ``` + + Hugo looks for the `sass` executable on `PATH`. When Hugo finds it, + `hugo env` lists `github.com/sass/dart-sass/...` entries. ## Configuration @@ -202,6 +210,7 @@ the [`AUTHORING.md`][authoring-guide] file. [go]: https://go.dev/doc/install [nodejs]: https://nodejs.org/en/download/current [hugo-quick-start]: https://gohugo.io/getting-started/quick-start/#step-1-install-hugo +[dart-sass]: https://gohugo.io/functions/css/sass/#dart-sass [site-commons]: https://github.com/SpineEventEngine/site-commons [embed-code]: https://github.com/SpineEventEngine/embed-code-go [authoring-guide]: https://github.com/SpineEventEngine/SpineEventEngine.github.io/blob/master/AUTHORING.md