Hugo v0.165.0

v0.165.0
Added 4
  • Add new css.ChromaStyles template function for generating Chroma syntax highlighting styles
  • Add importContext option to css.Build, js.Build, css.Sass, and css.TailwindCSS to make resources resolvable in import statements
  • Add Data.Artifacts to css.Build and js.Build
  • Add classDark and classLight options to css.ChromaStyles
Changed 4
  • Resume chained resource transformations
  • Drop source root mapping for the current source root in resources/jsconfig
  • Re-emit token colors dropped by Chroma's minifier
  • Remove some old deprecations
Fixed 7
  • Fix resource transformation chaining after content access
  • Fix server static file detection for deleted files and directories in the static syncer
  • Fix server errors when deleting static files or directories
  • Fix panic on server atomic save edits on MacOS
  • Fix TOC parsing for asciidoctor-html5s in markup/asciidocext
  • Fix snap home environment
  • Don't prune used cache entries with mixed-case dir names in cache/filecache
Removed 3
  • Remove tailwindcss from the default security.exec.allow list
  • Drop symlinks in parent directories
  • Delete .gemini

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
  • Remove tailwindcss from the default security.exec.allow list (note) 8a55df7a @bep #15178 #15171
Bug fixes
  • Fix resource transformation chaining after content access f772998f @bep #15189
  • Fix server static file detection for deleted files/directories in the static syncer 2ffaf1fc @bep
  • Fix server errors when deleting static files or directories a808f6e4 @bep #15174
  • Fix panic on server atomic save edits on MacOS 6bf15241 @bep #15130
  • markup/asciidocext: Fix TOC parsing for asciidoctor-html5s f961093e @jmooring #15121
  • snap: Fix snap home environment 984358f0 @jmooring #15114
Improvements
  • resources: Resume chained resource transformations 995a2159 @bep #15189 #15189
  • resources/jsconfig: Drop source root mapping for the current source root f88f0a9f @bep #15169
  • circleci: Upgrade to Go 1.26.5 52c9bd79 @bep
  • Add Data.Artifacts to css.Build and js.Build 44da0860 @bep #15173
  • css: Add classDark and classLight options to css.ChromaStyles and gen chromastyles 33d1f2c8 @bep #15167
  • markup/highlight: Re-emit token colors dropped by Chroma's minifier 64da6d7c @bep #15161
  • Add importContext option to css.Build, js.Build, css.Sass and css.TailwindCSS 70db201e @bep #15103
  • Remove some old deprecations 8a468df0 @bep
  • Add css.ChromaStyles 615e45d6 @bep #15112
  • check.sh: Handle staticcheck not installed/in PATH a243a615 @Soundcreates
  • warpc: Improve AVIF error message on memory allocation failure 7d90277a @bep
  • cache/filecache: Don't prune used cache entries with mixed-case dir names 861ede6d @bep #15101
  • Drop symlinks in parent directories f228c87d @bep
  • Delete .gemini 7df45f61 @bep
  • common/hugo: Include non-go dependencies in go env output 89b8c322 @jmooring #15116
Dependency Updates
  • build(deps): bump github.com/bep/imagemeta from 0.17.3 to 1.0.0 0bb337b2 @dependabot[bot]
  • build(deps): bump github.com/evanw/esbuild from 0.28.1 to 0.28.2 03dc9170 @dependabot[bot]
  • build(deps): bump github.com/tdewolff/minify/v2 from 2.24.14 to 2.24.16 c829b736 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.145.0 to 0.146.0 94f3908e @dependabot[bot]
  • build(deps): bump github.com/rogpeppe/go-internal from 1.15.0 to 1.16.0 75fcc752 @dependabot[bot]
  • build(deps): bump github.com/mattn/go-isatty from 0.0.22 to 0.0.24 b5fa03d3 @dependabot[bot]
  • build(deps): bump github.com/yuin/goldmark from 1.8.4 to 1.8.5 9da472dd @dependabot[bot]
  • build(deps): bump golang.org/x/tools from 0.47.0 to 0.48.0 635532a2 @dependabot[bot]
  • build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.13 to 2.2.14 9c71f600 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.144.0 to 0.145.0 420527fc @dependabot[bot]
  • build(deps): bump golang.org/x/image from 0.43.0 to 0.44.0 7fe786e3 @dependabot[bot]
  • build(deps): bump github.com/bep/imagemeta from 0.17.2 to 0.17.3 03b244fc @dependabot[bot]
  • build(deps): bump github.com/tdewolff/minify/v2 from 2.24.13 to 2.24.14 96118133 @dependabot[bot]
  • build(deps): bump github.com/yuin/goldmark from 1.8.2 to 1.8.4 e35b7f04 @dependabot[bot]
  • build(deps): bump golang.org/x/net from 0.56.0 to 0.57.0 0796fa7a @dependabot[bot]
  • build(deps): bump golang.org/x/text from 0.38.0 to 0.40.0 1b701b72 @dependabot[bot]
  • build(deps): bump github.com/getkin/kin-openapi from 0.140.0 to 0.144.0 a32d70b7 @dependabot[bot]
  • build(deps): bump google.golang.org/grpc from 1.80.0 to 1.82.1 948cfb98 @dependabot[bot]
  • build(deps): bump golang.org/x/mod from 0.37.0 to 0.38.0 8930802e @dependabot[bot]
Documentation
  • Remove Star History from README dd3f2731 @bep #15190
  • Update README.md d1f191c5 @jmooring
View original

Upgraded? How did it go?

Discussion