From 1b448137c74beac03325350f75e476302cd47504 Mon Sep 17 00:00:00 2001 From: irkode Date: Wed, 21 Aug 2024 10:34:49 +0200 Subject: [PATCH] adapt to using .scss instead of .sass with 1.0.0 update README for 1.x (using dart sass) --- .github/workflows/build.yml | 4 ++-- README.md | 28 ++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed134c1..65012b6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,8 +85,8 @@ jobs: Write-Output "download successful: $($BulmaRelease.archive)" $notes = @("### This release contains the following style files:`n", "- CSS`n") $notes += Get-ChildItem -Path .\assets\bulma -filter "*.css" -recurse | Resolve-Path -Relative | %{ " - $_" } - $notes += "`n- SASS`n" - $notes += Get-ChildItem -Path .\assets\bulma -filter "*.sass" | Resolve-Path -Relative | %{ " - $_" } + $notes += "`n- SASS / SCSS`n" + $notes += Get-ChildItem -Path .\assets\bulma -filter "*.s?ss" | Resolve-Path -Relative | %{ " - $_" } $notes += "`nRelease details on the [official release page](https://github.com/jgthms/bulma/releases/tag/$($BulmaRelease.release))" $notes | Set-Content -encoding utf8 notes.md Get-Content notes.md diff --git a/README.md b/README.md index 1a9052f..c770129 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,16 @@ Add _Bulma 4 Hugo_ either using plain clone or as submodule. git commit -m "bumped Bulma 4 Hugo to release 0.7.5" ``` +### Source archive + +Each release also has it's files added as `.zip` and `.tar.gz`archives attached. + +- Download an archive from it's Release: eg: https://github.com/irkode/bulma4hugo/archive/refs/tags/v1.0.2.zip +- Extract the archive to your themes folder +- rename the created `bulma4hugo-1.02`folder to `bulma` + +If you want to keep the version suffix, make sure to include it in your `theme` site parameter. + Add the theme to your site configuration - _Hugo_.yaml @@ -99,6 +109,8 @@ Add the theme to your site configuration theme = "bulma4hugo" ``` +If you kept the version information in the folder name when using the source variant. Use `bulma4hugo-1.0.2` + ## Use _Bulma_ After installing _Bulma 4 Hugo_ you may refer to the _Bulma_ css, sass files from `/assets/bulma` @@ -133,12 +145,24 @@ Since `Bulma 4 Hugo 0.7.6` we list the provided files in our release notes. For {{ end }} ``` -- use the sass file +- use the sass file (0.x versions) Straight from the docs at: [Asset Management - SASS](https://gohugo.io/hugo-pipes/transpile-sass-to-css/) ``` - {{ with resources.Get "bulma/bulma.scss" | toCSS | minify | fingerprint }} + {{ $opts := dict "transpiler" "libsass" "targetPath" "css/bulma4hugo.css" }} {{ + {{ with resources.Get "bulma/bulma.sass" | toCSS $opts | minify | fingerprint }} + + {{ end }} + ``` + +- use the sass file (1.x versions) + + > since Bulma 1.0.0 you need _dartsass_ to assemble. Install it and configure your _hugo pipe_ to use it + + ``` + {{ $opts := dict "transpiler" "dartsass" "targetPath" "css/bulma4hugo.css" }} {{ + {{ with resources.Get "bulma/bulma.scss" | toCSS $opts | minify | fingerprint }} {{ end }} ```