发布日期: 2026-01-28
版本号: v0.155.0

该版本主要更新包括:改进版本查询机制,支持范围查询并缓存模块版本;新增XMP和IPTC图像元数据支持;完善多语言站点的页面别名功能;提升WebP和图像处理性能。破坏性变更涉及以斜杠开头的别名路径从服务器相对路径改为站点相对路径,影响多语言单主机项目。同时修复了数据竞争、渲染逻辑等问题,并更新了多个依赖库。

更新内容 (中文)

本版本的一些显著新特性包括:

  • 改进了版本的处理方式:我们现在支持版本(也包括另一个维度)的范围查询(例如 >= v1.0.0),并且我们开始缓存 Go 模块版本查询,这使得挂载同一 GitHub 仓库的不同版本变得可行且更愉悦,可参见此站点及配置中的带注释示例。
  • 除了 EXIF,我们现在终于支持 XMP 和 IPTC 图片元数据,参见 #13146。
  • 页面 aliases(别名)现在可在多维度站点(例如多语言站点)中使用,并且现在更容易创建适用于此类设置的 Netlify _redirects 文件。
  • 本版本包含多项与性能相关的 WebP 改进。
  • 此外,常规的图片处理(例如调整尺寸操作)应该会更加高效。

破坏性变更

在 v0.155.0 之前,以斜杠(/)开头的别名路径被视为服务器相对路径。从 v0.155.0 及更高版本开始,它们现在被视为站点相对路径。此更改仅影响使用以斜杠(/)开头的别名路径来跨语言边界的多语言单主机项目。详见详细信息

注意

  • 使 Page.Aliases 在多维度设置中更实用 (note) ee91c707 @bep #14402

错误修复

  • 修复在缓存清除器中清除缓存时的数据竞争 8a979d54 @wjiec
  • resources/images:修复 ImageConfig 中 Quality 字段的注释 fd49df8f @bep
  • 修复在论坛报告的 panic 问题 c7b35c87 @bep #14441
  • 修复最近引入的 partial 渲染错误 8dfcece8 @bep #14433
  • tpl:修复当 partial 返回 falsy 值时 partial 装饰器的 panic f472dd48 @simonheimlicher #14419
  • resources:修复测试辅助函数中的竞争条件 48566b6f @simonheimlicher
  • 修复级联草稿导致的 panic 11f7f399 @bep #14409 #14412
  • hugolib:修复多语言别名生成 5ba03bf6 @jmooring #14388
  • 修复同一模块内文件挂载的特殊性问题 c1b2e58b @bep #14405
  • warpc:修复 Start 中的类型化 nil 返回 2c611091 @Sam-404-404 #14372
  • hugolib:修复相对别名生成 32334d09 @jmooring #14381

改进

  • 从 MetaConfig 中移除 disableDate 和 disableLatLong 5916b61b @bep #14437
  • internal/warpc:使 webp C 默认值与 Go 默认值匹配 7eafef22 @bep
  • testscripts:将服务器测试移至自己的文件夹 00c4228f @bep #14439
  • testing:在非 CI 环境运行时跳过一些慢速测试 5f5b2f37 @bep #14438
  • magefile:本地运行 mage check 时跳过命令测试 ef7a22a2 @bep
  • 移除本地测试运行的 -p 2 并行限制 9a6bfe26 @bep
  • 添加 AGENTS.md 和 CLAUDE.md 0fc63fbf @bep
  • 为范围谓词添加 == 和 != 运算符 50973e72 @bep
  • 为模块版本查询添加模块查询文件缓存 b441472b @bep #14417
  • 允许 v1、v2 等样式的版本名,同时仍在查询中支持完整的语义化版本 ac2c3fb2 @bep #14414
  • 为站点矩阵向量存储过滤添加范围匹配器 192e3c45 @bep #14359
  • 多项 WebP 性能工作 e569dd59 @bep #14370
  • 从 github.com/disintegration/gift 迁移到 github.com/gohugoio/gift 1a947316 @bep #14397
  • resources/images:稳定错误消息中有效源的顺序 8e9e04e3 @jmooring #14390
  • 添加 XMP 和 IPTC 图片元数据支持 8e2e60dd @bep #13146
  • output:添加 TestCanonical 集成测试 2bc54df6 @bep
  • 将 common/maps 重命名为 common/hmaps (#14384) 608ed09a @bep
  • 原生解码 webp.ImageConfig d36a8f56 @bep #14371

依赖项更新

  • build(deps): 将 golang.org/x/tools 从 0.40.0 升级至 0.41.0 7d45614c @dependabot[bot]
  • build(deps): 将 github.com/olekukonko/tablewriter 从 1.1.2 升级至 1.1.3 7f12c090 @dependabot[bot]
  • build(deps): 将 github.com/alecthomas/chroma/v2 从 2.23.0 升级至 2.23.1 dab2c332 @dependabot[bot]
  • build(deps): 将 github.com/aws/aws-sdk-go-v2/service/cloudfront 升级 576d55d0 @dependabot[bot]
  • build(deps): 将 golang.org/x/image 从 0.34.0 升级至 0.35.0 b9400b8a @dependabot[bot]
  • build(deps): 将 golang.org/x/mod 从 0.31.0 升级至 0.32.0 ce0c7f42 @dependabot[bot]
  • deps: 将 github.com/gohugoio/gift 从 v0.1.0 升级至 v0.2.0 77214117 @bep
  • build(deps): 将 github.com/alecthomas/chroma/v2 从 2.22.0 升级至 2.23.0 18784711 @dependabot[bot]
  • build(deps): 将 golang.org/x/net 从 0.48.0 升级至 0.49.0 94f1ede3 @dependabot[bot]
  • build(deps): 将 github.com/bep/lazycache 从 0.8.0 升级至 0.8.1 ab374e3d @dependabot[bot]
  • deps: 将 github.com/alecthomas/chroma 从 v2.21.1 升级至 v2.22.0 1a913307 @jmooring #14368

构建设置

  • 撤回 “release: 支持 alpha、beta 和 RC 版本” e66a33d3 @bep #14448

文档

  • misc:更新 README.md 中的图片处理描述 b3ea2a5f @jmooring
  • docs:更新 docs.yaml 67b54354 @jmooring
  • 使 docs 辅助函数的 maxAge JSON 输出更用户友好 5a64551a @bep

更新内容 (原始)

Some notable new things in this release are:

  • Improvements to how versions are handled: We now support version (and also for the other dimension) range queries (e.g. >= v1.0.0), and we now cache Go module version queries, which makes mounting multiple versions of the same GitHub repo with different version much more practical and enjoyable, se this site and config for an annotated example.
  • We finally have XMP and IPTC image metadata support, in addition to EXIF, see #13146
  • Page aliases now works in multidimensional sites (e.g. multiple languages), and it is now much easier to create e.g. Netlify _redirects files that works in such setups.
  • There are several performance related WebP improvements in this release.
  • Also, image processing in general (e.g. resize operations) should be considerably more effective.

Breaking change

Prior to v0.155.0, alias paths beginning with a slash (/) were treated as server-relative. In v0.155.0 and later, they are now site-relative. This change only affects multilingual single-host projects that used alias paths beginning with a slash (/) to cross language boundaries. See details.

Note

  • Make Page.Aliases more useful in multidimensional setups (note) ee91c707 @bep #14402

Bug fixes

  • Fix data race when clearing cache in cachebusters 8a979d54 @wjiec
  • resources/images: Fix comment for Quality field in ImageConfig fd49df8f @bep
  • Fix panic reported in discourse c7b35c87 @bep #14441
  • Fix recently introduced partial rendering bug 8dfcece8 @bep #14433
  • tpl: Fix partial decorator panic when partial returns falsy f472dd48 @simonheimlicher #14419
  • resources: Fix race condition in test helper 48566b6f @simonheimlicher
  • Fix cascade draft panic 11f7f399 @bep #14409 #14412
  • hugolib: Fix multilingual alias generation 5ba03bf6 @jmooring #14388
  • Fix file mount specifity issue within the same module c1b2e58b @bep #14405
  • warpc: Fix typed nil return in Start 2c611091 @Sam-404-404 #14372
  • hugolib: Fix relative alias generation 32334d09 @jmooring #14381

Improvements

  • Remove disableDate and disableLatLong from MetaConfig 5916b61b @bep #14437
  • internal/warpc: Make webp C defaults match the Go defaults 7eafef22 @bep
  • testscripts: Move server tests to own folder 00c4228f @bep #14439
  • testing: Skip some slow tests when not running in CI 5f5b2f37 @bep #14438
  • magefile: Skip commands test when running mage check locally ef7a22a2 @bep
  • Remove -p 2 parallelism limit for local test runs 9a6bfe26 @bep
  • Add AGENTS.md and CLAUDE.md 0fc63fbf @bep
  • Add == and != operators to range predicates 50973e72 @bep
  • Add modulequeries file cache for module version queries b441472b @bep #14417
  • Allow v1,v2 etc. style version names while still supporting full semver in queries ac2c3fb2 @bep #14414
  • Add range matchers for site matrix vector store filtering 192e3c45 @bep #14359
  • Misc webp performance work e569dd59 @bep #14370
  • Move from github.com/disintegration/gift to github.com/gohugoio/gift 1a947316 @bep #14397
  • resources/images: Stabilize order of valid sources in error message 8e9e04e3 @jmooring #14390
  • Add XMP and IPTC image metadata support 8e2e60dd @bep #13146
  • output: Add TestCanonical integration test 2bc54df6 @bep
  • Rename common/maps to common/hmaps (#14384) 608ed09a @bep
  • Decode webp.ImageConfig natively d36a8f56 @bep #14371

Dependency Updates

  • build(deps): bump golang.org/x/tools from 0.40.0 to 0.41.0 7d45614c @dependabot[bot]
  • build(deps): bump github.com/olekukonko/tablewriter from 1.1.2 to 1.1.3 7f12c090 @dependabot[bot]
  • build(deps): bump github.com/alecthomas/chroma/v2 from 2.23.0 to 2.23.1 dab2c332 @dependabot[bot]
  • build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront 576d55d0 @dependabot[bot]
  • build(deps): bump golang.org/x/image from 0.34.0 to 0.35.0 b9400b8a @dependabot[bot]
  • build(deps): bump golang.org/x/mod from 0.31.0 to 0.32.0 ce0c7f42 @dependabot[bot]
  • deps: Upgrade github.com/gohugoio/gift v0.1.0 => v0.2.0 77214117 @bep
  • build(deps): bump github.com/alecthomas/chroma/v2 from 2.22.0 to 2.23.0 18784711 @dependabot[bot]
  • build(deps): bump golang.org/x/net from 0.48.0 to 0.49.0 94f1ede3 @dependabot[bot]
  • build(deps): bump github.com/bep/lazycache from 0.8.0 to 0.8.1 ab374e3d @dependabot[bot]
  • deps: Upgrade github.com/alecthomas/chroma v2.21.1 => v2.22.0 1a913307 @jmooring #14368

Build Setup

  • Revert “release: Support alpha, beta, and RC releases” e66a33d3 @bep #14448

Documentation

  • misc: Update image processing description in README.md b3ea2a5f @jmooring
  • docs: Update docs.yaml 67b54354 @jmooring
  • Make docs helper maxAge JSON output user friendly 5a64551a @bep

下载链接