hugo v0.150.0 版本更新介绍
发布日期: 2025-09-08
版本号: v0.150.0
本次Hugo更新引入了一个重要的新功能:在模块导入配置中支持直接指定版本查询参数。用户现在可以在
hugo.toml的[Module.imports]配置部分通过新增的version选项(例如version = "v1.2.3")来明确设定模块版本,简化了以往需要复杂版本查询流程的操作。此功能响应了许多开发者的请求,其典型应用场景之一是在项目中挂载同一仓库的多个历史版本或分支的API文档。此外,本次更新还升级了依赖库,修复了资源页面摘要截断的逻辑,并增强了安全配置中的系统环境变量允许列表。
更新内容 (中文)
本版本的重大新功能是模块导入中新增的version配置选项,允许您直接在Hugo配置文件(如hugo.toml)中设置所需的模块版本查询。这是许多用户长期期待的功能,@bep 在近期讨论帖中再次意识到其重要性——该帖子同时阐述了此功能的典型用例:将同一API文档的多个历史版本/分支挂载到项目中。
变更内容
- 构建依赖:将golang.org/x/mod从0.27.0升级至0.28.0 d1f6a1dc5 @dependabot[bot]
- 模块系统:支持在hugo.toml中直接导入指定版本的模块 747cf4ad6 @bep #13964
- 资源/页面:修复摘要截断逻辑问题 d8774d7fc @jmooring #13967 #13968
- 安全配置:将PROGRAMDATA加入操作系统环境变量白名单 3b8947d82 @jmooring
更新内容 (原始)
The big new feature in this relase is the new version config option on Module imports, which allows you to set the requested module version query directly in your Hugo configuration (e.g. hugo.toml). This is a feature that have been requested by many, and I (@bep) was reminded about it by this recent thread, which also outlines a common use case for this: Mounting multiple old versions/branches of API documentation into the project.
What’s Changed
- build(deps): bump golang.org/x/mod from 0.27.0 to 0.28.0 d1f6a1dc5 @dependabot[bot]
- modules: Add support for direct version module imports in hugo.toml 747cf4ad6 @bep #13964
- resources/page: Fix truncated summary logic d8774d7fc @jmooring #13967 #13968
- config/security: Add PROGRAMDATA to the osenv allowlist 3b8947d82 @jmooring
下载链接
- hugo_0.150.0_checksums.txt
- hugo_0.150.0_darwin-universal.tar.gz
- hugo_0.150.0_dragonfly-amd64.tar.gz
- hugo_0.150.0_freebsd-amd64.tar.gz
- hugo_0.150.0_Linux-64bit.tar.gz
- hugo_0.150.0_linux-amd64.deb
- hugo_0.150.0_linux-amd64.tar.gz
- hugo_0.150.0_linux-arm.tar.gz
- hugo_0.150.0_linux-arm64.deb
- hugo_0.150.0_linux-arm64.tar.gz
- hugo_0.150.0_netbsd-amd64.tar.gz
- hugo_0.150.0_openbsd-amd64.tar.gz
- hugo_0.150.0_solaris-amd64.tar.gz
- hugo_0.150.0_windows-amd64.zip
- hugo_0.150.0_windows-arm64.zip
- hugo_extended_0.150.0_darwin-universal.tar.gz
- hugo_extended_0.150.0_Linux-64bit.tar.gz
- hugo_extended_0.150.0_linux-amd64.deb
- hugo_extended_0.150.0_linux-amd64.tar.gz
- hugo_extended_0.150.0_linux-arm64.deb
- hugo_extended_0.150.0_linux-arm64.tar.gz
- hugo_extended_0.150.0_windows-amd64.zip
- hugo_extended_withdeploy_0.150.0_darwin-universal.tar.gz
- hugo_extended_withdeploy_0.150.0_Linux-64bit.tar.gz
- hugo_extended_withdeploy_0.150.0_linux-amd64.deb
- hugo_extended_withdeploy_0.150.0_linux-amd64.tar.gz
- hugo_extended_withdeploy_0.150.0_linux-arm64.deb
- hugo_extended_withdeploy_0.150.0_linux-arm64.tar.gz
- hugo_extended_withdeploy_0.150.0_windows-amd64.zip