Releases: gohugoio/hugo
v0.116.1
v0.116.0
There are two notable changes in this release. For one, we have changed the default location of the cacheDir
(where Hugo stores all its file caches). Having the cache stored in a /tmp
folder has had its issues, especially for the module cache and especially on MacOS. The current new default should be better and more stable. See See Configure CacheDir for more info.
Also in this release: The where
template func finally supports regular expressions with the new like operator.
Note
- Deprecate taxonomyTerm bec9b80 @bep #11256
- Warn about unknown kinds in disableKinds 1c97095 @bep #11256
- The default value for
cacheDir
is changed to be stored below the directory as defined by Go's os.UserCacheDir. See Configure CacheDir
Bug fixes
- resources: Fix spelling in method name be8e2de @bep
- Fix so temporary images do not get published fbb8eb3 @bep #10255
- readme: Fix link 87d9bff @tfsojon
- tpl/collections: Fix description of apply function dc2a544 @jmooring
- Fix multiple languages in HUGO_DISABLELANGUAGES 7f058b8 @bep #11278
Improvements
- config: Do not fail on unknown config keys c1df5b1 @bep
- commands: Update cacheDir description d9fdcbe @jmooring
- Update where.md 295d733 @bep
- Deprecate taxonomyTerm bec9b80 @bep #11256
- Warn about unknown kinds in disableKinds 1c97095 @bep #11256
- Move all Kind constants to its own package b3cb678 @bep #11256
- Remove unused autogenerated method 36b5126 @bep
- tpl/collections: Add BenchmarkWhereOps ef6e813 @bep
- tpl/collections: Add like operator to where function f4598a0 @jmooring #11279
- Use os.UserCacheDir as first fallback if cacheDir is not set b3f1055 @bep #11286 #11291
- Add a common regexp cache 4d7af75 @bep
- commands: Replace deprecated ioutil with os 2589b12 @alexandear
Dependency Updates
- build(deps): bump github.com/evanw/esbuild from 0.18.11 to 0.18.17 d7db096 @dependabot[bot]
- build(deps): bump github.com/rogpeppe/go-internal 5542f02 @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.8.0 to 0.9.0 0bc7ed9 @dependabot[bot]
- deps: Upgrade github.com/yuin/goldmark v1.5.4 => v1.5.5 739d10e @jmooring
Documentation
- docs: Regenerate CLI docs d297c8e @bep
- docs: Update where d524778 @bep
- docs: Update where function operators 036e260 @jmooring
- docs: Rework the cacheDir documentation a50356b @bep
Build Setup
v0.115.4
Bug fixes
- Fix broken handling of legacy taxonomyTerm in disableKinds d70b6c7 @bep #11257
- Fix cache busting setup 6bbec90 @bep #11268
- common/htime: Fix localization of abbreviated month names 2f11e67 @jmooring #11267
- Fix setting config from env with complex (e.g. YAML) strings c406fd3 @bep #11249
- Fix for data mounts in sub folders 286821e @dvdksn
Improvements
- commands: Move testscript into its correct place d947db3 @bep
- publisher: Improve class collector for dynamic classes d8c94c3 @bep
- commands: Delay server builds after the watcher is set up 5bd22ba @bep #11264
- Create hugo_stats.json if it's mounted but does not exists 7ae62f4 @bep #11264
- Re-instate disableLiveReload as a config option (and not just a flag) f1a061e @bep #11259
- Improve error messages for PostCSS etc. 387c5f6 @bep #9730
v0.115.3
What's Changed
- Improve behavior of defaultContentLanguageInSubdir when only the default language is enabled cc44583 @bep #11229
- Return error when .Render is invoked without arg 4da672a @bep #11243
- js: Pass tsconfig.json to esBuild f1886f8 @jmooring #11232
- tpl/collections: Fix WordCount (etc.) regression in Where, Sort, Delimit 5bec508 @bep #11234
- config/allconfig: Update timeout description f650e4d @jmooring
- docs: Refresh docs.json c934a45 @jmooring
v0.115.2
Bug fixes
- Fix hugo mod vendor for modules with hugo.toml 0f921ac @bep #11221
- Fix static content files multilingual root regression 6019953 @bep #11223
- Fix defaultContentLanguageInSubdir with only 1 language 92e8670 @bep #10064
- Make imageConfig work with modules a78b17d @bep #11205
- Restore language.disabled config a481942 @bep #11219
Improvements
- config: Expand default security.exec.osEnv policy 6c9ea02 @dvdksn #9333
- Add titleCaseStyle none and firstupper 12d3469 @bep #11204
- Bump github.com/bep/clock v0.3.0 to renamed github.com/bep/clocks v0.5.0 bf7ee8a @anthonyfok
Build Setup
v0.115.1
Bug fixes
- Fix buildStats when tags and classes are disabled ceb486f @bep #11202
- commands: Fix index out of range in hugo mod get 0ff8e13 @bep #11190
Improvements
- Rework the build.writeStats struct 5afc89f @bep #11191
- github: Build for Dragonfly in CI build 19d76ae @bep
- Make build.writeStats a struct 11ecea6 @bep #11191
- Only print the path warnings once ffd37d4 @bep #11187
Dependency Updates
- build(deps): bump github.com/evanw/esbuild from 0.18.10 to 0.18.11 da98724 @dependabot[bot]
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.7.0 to 2.8.0 4d470bb @dependabot[bot]
Documentation
Build Setup
v0.115.0
The notable new feature in this release is that you can now have permalink configuration also for section and taxonomy pages. Thanks to @Mai-Lapyst for the implementation. See the documentation for more information.
Bug fixes
- commands: Fix panic when running hugo new theme without theme name 635cc34 @deining #11162
- Fix output formats and media type per language config regression 79639c9 @bep #11159
- common/collections: Fix append regression to allow appending nil b74b8d6 @khayyamsaleem #11180
- commands: Fix help message for hugo new theme 793e38f @deining #11161
- Fix false path warnings with resources.PostProcess fa0e16f @bep #7735
- tpl/tplimpl: Fix typo in global variable name e3308a0 @alexandear
- Fix broken nodeploy setup 5b4bfc2 @bep #11149
Improvements
- Misc permalinks adjustments 7917961 @bep #9448 #11184 #8523
- commands: Handle hugo mod get --help 80ecb95 @bep #11141
- Print help message when triggered with no flags 1264675 @roshanavand
- Don't panic on invalid security whitelist regexp 7f698c8 @bep #11176
- Merge branch 'master' of github.com:gohugoio/hugo bac03f4 @bep
- resources/page: Allow section and taxonomy pages to have a permalink configuration cc14c6a @Mai-Lapyst #8523
- commands: Enable format flag with hugo new site 019299b @jmooring #11155
Dependency Updates
- build(deps): bump github.com/evanw/esbuild from 0.18.5 to 0.18.10 9b313ce @dependabot[bot]
- build(deps): bump github.com/niklasfasching/go-org from 1.6.6 to 1.7.0 92f55f1 @dependabot[bot]
Documentation
- Update README.md 58e09cc @jmooring
- docs: Update permalinks documentation 12e4c4d @jmooring #8523 #10847
- Update README.md 23ed087 @bep
Build Setup
v0.114.1
Bug fixes
- Fix broken nodeploy setup 078226d @bep #11149
- commands: Make hugo env respect --logLevel b1016d2 @bep #11145
Improvements
- commands: Update Jekyll post-import output 49336bf @brianknight10 #10715
Dependency Updates
- Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.30.0" ae31dbd @bep
- build(deps): bump gocloud.dev from 0.24.0 to 0.30.0 9418182 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.18.4 to 0.18.5 5491e55 @dependabot[bot]
- deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.7 bf7af90 @jmooring #11132
Build Setup
v0.114.0
The main new thing in this release is that we now support both major versions of the Dart Sass Embedded protocol, which means that you now can use the regular Dart Sass binary. We measured the new protocol to be faster with high concurrency:
name old time/op new time/op delta
Transpiler/SCSS-10 114µs ± 0% 145µs ± 1% +26.40% (p=0.029 n=4+4)
Transpiler/Start_and_Execute-10 25.6ms ± 2% 26.0ms ± 3% ~ (p=0.486 n=4+4)
Transpiler/SCSS_Parallel-10 89.0µs ± 2% 44.4µs ± 3% -50.12% (p=0.029 n=4+4)
name old alloc/op new alloc/op delta
Transpiler/SCSS-10 1.33kB ± 1% 1.33kB ± 0% ~ (p=1.000 n=4+4)
Transpiler/Start_and_Execute-10 22.4kB ± 1% 22.4kB ± 1% ~ (p=0.886 n=4+4)
Transpiler/SCSS_Parallel-10 1.34kB ± 3% 1.33kB ± 1% ~ (p=1.000 n=4+4)
name old allocs/op new allocs/op delta
Transpiler/SCSS-10 18.0 ± 0% 18.0 ± 0% ~ (all equal)
Transpiler/Start_and_Execute-10 144 ± 1% 150 ± 0% +4.16% (p=0.029 n=4+4)
Transpiler/SCSS_Parallel-10 18.0 ± 0% 18.0 ± 0% ~ (all equal)
We have also moved to a new log library and added some new math functions and also revised the existing set to work better with a mix of scalars and slices.
Notes
- We have removed the flags
--log
,--verboseLog
, added the new flag--logLevel
and deprecated--verbose
and--debug
See #11088 - This release contains a security fix in the upstream Go HTML template library disallowing JavaScript inside backticks by default. See golang/go#59234 If you really need this and are sure this isn't a security risk in your case, you can revert to the old behaviour:
[security]
[security.gotemplates]
allowActionJSTmpl = true
Bug fixes
- common/loggers: Drop the bold INFO etc. prefixes 6dfbd24 @bep
- all: Fix some typos 68d9d3e @deining
- all: Fix typos in function names and comments 9009c8c @alexandear
- deploy: Fix deploy defaults for non-zero flag values (e.g. maxDeletes, invalidateCDN) 12dc9a6 @bep #11127
- Fix upstream Go templates bug with reversed key/value assignment ee359df @bep #11112
- tpl/collections: Fix append when appending a slice to a slice of slices d178fe9 @bep #11093
- Fix .Width and .Height for animated gifs 21d1756 @bep #11079
- Fix config merge regression with root slices (e.g. disableKinds) 60a2cdf @bep #11089
- Fix handling of aliases (e.g. hugo serve) 0541a1b @bep #11090
- commands,config: Fix typo in log and error messages b8526f3 @alexandear
- Fix indented SASS imports for Dart Sass c782ebd @bep #11074
Improvements
- Add empty Environ when loading test config 3ab8465 @bep
- loggers: Avoid using Logf for the LevelLoggerToWriter f59c3c0 @bep
- tocss/dartsas: Avoid using Logf for the internal Dart Sass logging 3ca29b1 @bep
- helpers: Remove superflous formatting flag in deprecation warnings fdb0b7f @bep
- common/loggers: Re-add trailing newline in logger.Printf 1b85303 @bep #11130
- Replace the old log setup, with structured logging etc. 7c9fada @bep #11124
- common/collections: Always make a copy of the input slice in Append f73c567 @bep #10458
- Re-add site.RSSLink (and deprecate it) 90b2674 @bep #11110
- tpl/math: Allow variadic math functions to take slice args, add math.Product, math.Sum 2ba2271 @bep #11030
- commands: Remove flags log, verboseLog, add flag logLevel, deprecate flags verbose and debug ef147f4 @bep #9648 #11071
- cache: Set default cache path based on $USER 258884f @Sircular #7391
- resources: Remove failing and superflous test assertion 69f0e88 @bep
- helpers: Avoid url.Parse in RelURL and AbsURL if we can ed7e250 @bep
- Adjust benchmarks 6a09e7f @bep
- Adjust benchmark 29e5cbb @bep
- Add BenchmarkAbsURL ded6866 @bep
- helpers: Improve schema detection when creating relative URLs e1d4302 @jmooring #11080
- helpers: Add a basic benchmark for RelURL 5db215d @bep
- config: Remove unexpected _merge keys introduced in author and social maps b7dc93c @bep #11083
- Upgrade to v2 of the Dart Sass Embedded Protocol f210188 @bep #11059
Dependency Updates
- Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.29.0" 59300fa @bep
- Revert "deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.6" 49dd53a @bep #11132
- build(deps): bump github.com/evanw/esbuild from 0.18.3 to 0.18.4 8a04d47 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.18.2 to 0.18.3 aaf2e96 @dependabot[bot]
- build(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0 0f989d5 @dependabot[bot]
- build(deps): bump google.golang.org/api from 0.123.0 to 0.127.0 732dcb8 @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.9.1 to 0.9.3 944859f @dependabot[bot]
- build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.11 to 2.2.12 bb9377b @dependabot[bot]
- build(deps): bump github.com/getkin/kin-openapi from 0.117.0 to 0.118.0 e88f1b8 @dependabot[bot]
- build(deps): bump golang.org/x/net from 0.10.0 to 0.11.0 516f0cb @dependabot[bot]
- build(deps): bump gocloud.dev from 0.24.0 to 0.29.0 7bed16c @dependabot[bot]
- build(deps): bump golang.org/x/image from 0.7.0 to 0.8.0 e08cfc8 @dependabot[bot]
- build(deps): bump github.com/magefile/mage from 1.14.0 to 1.15.0 4895195 @dependabot[bot]
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.6 to 2.0.8 91c0b0f @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.17.19 to 0.18.2 baef235 @dependabot[bot]
- build(deps): bump go.uber.org/atomic from 1.10.0 to 1.11.0 254c2b3 @dependabot[bot]
- build(deps): bump github.com/hairyhenderson/go-codeowners 84f71ba @dependabot[bot]
- build(deps): bump github.com/frankban/quicktest from 1.14.4 to 1.14.5 82adc97 @dependabot[bot]
- build(deps): bump github.com/mattn/go-isatty from 0.0.17 to 0.0.19 60533fd @dependabot[bot]
- build(deps): bump github.com/spf13/afero from 1.9.3 to 1.9.5 261143b @dependabot[bot]
Documentation
Build Setup
v0.113.0
This release adds TLS/HTTPS support to hugo server
(see cf38c73 and #11064 for details) entirely backed by mkcert. We still default to http
which is recommended and good enough for 99% of the Hugo use, but there are some situations where you really need it.
We have added a new sub command and some new flags to hugo server
to enable this:
# Installs a local CA in the system root store. You only need to do this once.
hugo server trust
# Generates locally-trusted certificates (if not already created) and starts the server with TLS/HTTPS enabled.
hugo server --tlsAuto
Note that we just delegate to mkcert using its default settings, so all of their documentation is relevant.
Also note that this is currently only supported for Linux, MacOS and Windows. And if you install on Linux using Snap, you will currently get an access denied error when running hugo server trust
. A workaround for that, or if you need to use some of mkcert's advanced options, is to use mkcert directly to install the local CA:
go install filippo.io/mkcert@latest
mkcert -install
You can then start the server with hugo server --tlsAuto
.
If you have obtained the TLS certificate and key file by other means, you can use the --tlsCertFile
and --tlsKeyFile
flags. When --tlsAuto
or --tlsCertFile
and --tlsKeyFile
is set and no --baseURL
is provided as a flag, the server is started with TLS and https
as the protocol.