Skip to content

Commit

Permalink
update README for 1.x (using dart sass)
Browse files Browse the repository at this point in the history
  • Loading branch information
irkode committed Aug 21, 2024
1 parent eb9f2b0 commit f1b136f
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion 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,11 +145,23 @@ 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/)

```
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/bulma4hugo.css" }} {{
{{ with resources.Get "bulma/bulma.sass" | toCSS | 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 | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
Expand Down

0 comments on commit f1b136f

Please sign in to comment.