github gohugoio/hugo v0.165.0

4 hours ago

The two main new things is the new css.ChromaStyles template func and the new importContext option demonstrated below.

{{ $light := css.ChromaStyles (dict "targetPath" "css/components/chroma-light.css" "style" "github" "mode" "light") }}
{{ $dark := css.ChromaStyles (dict "targetPath" "css/components/chroma-dark.css" "style" "github" "mode" "dark") }}
{{ $opts := dict "minify" true "importContext" (slice $light $dark) }}
{{ $css := resources.Get "css/main.css" | css.Build $opts }}

The importContext is relevant for css.Build, js.Build, css.Sass, and css.PostCSS. and it allows you to make resources (e.g. built from resources.FromString) resolvable in e.g. CSS @import statements.

Note

Bug fixes

Improvements

Dependency Updates

  • build(deps): bump github.com/bep/imagemeta from 0.17.3 to 1.0.0 0bb337b @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.28.1 to 0.28.2 03dc917 @dependabot[bot]
  • build(deps): bump github.com/tdewolff/minify/v2 from 2.24.14 to 2.24.16 c829b73 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.145.0 to 0.146.0 94f3908 @dependabot[bot]
  • build(deps): bump github.com/rogpeppe/go-internal from 1.15.0 to 1.16.0 75fcc75 @dependabot[bot]
  • build(deps): bump github.com/mattn/go-isatty from 0.0.22 to 0.0.24 b5fa03d @dependabot[bot]
  • build(deps): bump github.com/yuin/goldmark from 1.8.4 to 1.8.5 9da472d @dependabot[bot]
  • build(deps): bump golang.org/x/tools from 0.47.0 to 0.48.0 635532a @dependabot[bot]
  • build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.13 to 2.2.14 9c71f60 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.144.0 to 0.145.0 420527f @dependabot[bot]
  • build(deps): bump golang.org/x/image from 0.43.0 to 0.44.0 7fe786e @dependabot[bot]
  • build(deps): bump github.com/bep/imagemeta from 0.17.2 to 0.17.3 03b244f @dependabot[bot]
  • build(deps): bump github.com/tdewolff/minify/v2 from 2.24.13 to 2.24.14 9611813 @dependabot[bot]
  • build(deps): bump github.com/yuin/goldmark from 1.8.2 to 1.8.4 e35b7f0 @dependabot[bot]
  • build(deps): bump golang.org/x/net from 0.56.0 to 0.57.0 0796fa7 @dependabot[bot]
  • build(deps): bump golang.org/x/text from 0.38.0 to 0.40.0 1b701b7 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.140.0 to 0.144.0 a32d70b @dependabot[bot]
  • build(deps): bump google.golang.org/grpc from 1.80.0 to 1.82.1 948cfb9 @dependabot[bot]
  • build(deps): bump golang.org/x/mod from 0.37.0 to 0.38.0 8930802 @dependabot[bot]

Documentation

Don't miss a new hugo release

NewReleases is sending notifications on new releases.