Skip to content

Commit

Permalink
adapt to using .scss instead of .sass with 1.0.0
Browse files Browse the repository at this point in the history
update README for 1.x (using dart sass)
  • Loading branch information
irkode committed Aug 21, 2024
1 parent 9cbc7f7 commit 1b44813
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`
Expand Down Expand Up @@ -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 }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ 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 }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
```
Expand Down

0 comments on commit 1b44813

Please sign in to comment.