diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 082220563791..a1e0481c4b8d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,6 +35,9 @@ jobs: - name: Install npm dependencies run: npm ci + - name: Install Dart Sass + run: sudo snap install dart-sass + - name: Build docs run: npm run docs-build diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000000..156cd9998d59 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,13 @@ +# https://gohugo.io/functions/resources/tocss/#installation-overview + +[build.environment] +DART_SASS_VERSION = "1.71.1" + +[build] +command = """\ + curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \ + tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \ + rm dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz && \ + export PATH=/opt/build/repo/dart-sass:$PATH && \ + npm run netlify \ + """ diff --git a/package.json b/package.json index 9797bb3f4c6f..7b06bb3d7c5b 100644 --- a/package.json +++ b/package.json @@ -163,9 +163,6 @@ "scss/**/*.scss", "!scss/tests/**" ], - "hugo-bin": { - "buildTags": "extended" - }, "jspm": { "registry": "npm", "main": "js/bootstrap", diff --git a/site/layouts/partials/stylesheet.html b/site/layouts/partials/stylesheet.html index 9969ee44fc4f..89955d7eeb14 100644 --- a/site/layouts/partials/stylesheet.html +++ b/site/layouts/partials/stylesheet.html @@ -9,7 +9,7 @@ {{- end }} {{- if (ne .Page.Layout "examples") }} -{{- $sassOptions := dict "outputStyle" "expanded" "precision" 6 -}} +{{- $sassOptions := dict "transpiler" "dartsass" "outputStyle" "expanded" -}} {{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}} {{- $targetDocsCssPath := path.Join "/docs" .Site.Params.docs_version "assets/css/docs.css" -}}