Commit Graph

9807 Commits

Author SHA1 Message Date
Bjørn Erik Pedersen 70a9068aa6 parser/pageparser: Preserve non-ASCII whitespace after e.g. summary divider
Make it insted consume just ASCII whitespace, which preserves e.g. ideographic space (U+3000) after the summary divider, which is important for e.g. Chinese and Japanese content, and possibly other Unicode whitespace characters with meaning.

Doing this is possibly breaking, but not likely, and obviously the correct thing to do.
2026-06-18 16:23:06 +02:00
Joe Mooring 9d66d513ce resources: Support babel/postcss config variants
Allow modules to use .mjs and .cjs file extensions for Babel and PostCSS
configuration files instead of just .js.

Closes #15039
Closes #15040
Closes #15043
2026-06-18 16:22:10 +02:00
Joe Mooring f013346667 hugolib: Fix page/section name collision regression
Fixes #15046

When a regular page (e.g. content/s1.md) and a section (content/s1/)
share the same tree key, the assembler must not overwrite the real page
with a synthetic section. Restore the existence guard that was present
in v0.152.2.

The fix checks if a node already exists at the section key before
inserting a synthetic section during root section creation.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 16:20:34 +02:00
hugoreleaser 96e06e1ab8 releaser: Prepare repository for 0.164.0-DEV
[ci skip]
2026-06-15 15:17:37 +00:00
hugoreleaser 19a5cec0b9 releaser: Bump versions for release of 0.163.2
[ci skip]
v0.163.2
2026-06-15 14:55:00 +00:00
Bjørn Erik Pedersen 134674f00d Continue resolving on ERR_ACCESS_DENIED in Node's resolver
And then rethrow the ERR_ACCESS_DENIED if we cannot recover.

There's more details in #15041, but this error has been seen on Netlify with the CJS because of how Netlify has their node_modules cache folder set up.

Fixes #15041
2026-06-15 15:53:19 +02:00
Joe Mooring 147f605f7d markup: Standardize behavior when external converters are missing
Closes #14222
2026-06-13 20:19:47 +02:00
hugoreleaser 1f35beb918 releaser: Prepare repository for 0.164.0-DEV
[ci skip]
2026-06-11 15:55:44 +00:00
hugoreleaser 2a4fd58818 releaser: Bump versions for release of 0.163.1
[ci skip]
v0.163.1
2026-06-11 15:34:40 +00:00
dependabot[bot] 93c8c7d345 build(deps): bump golang.org/x/image from 0.41.0 to 0.42.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.41.0 to 0.42.0.
- [Commits](https://github.com/golang/image/compare/v0.41.0...v0.42.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.42.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-11 16:15:56 +02:00
Bjørn Erik Pedersen 95e5e9f4ab Fix multi --renderSegments merge behavior
Fixes #15024
2026-06-11 15:25:43 +02:00
Bjørn Erik Pedersen a00b5c72ac security: Normalize integer IPv4 host encodings in http.urls check
Canonicalize integer/hex/octal IPv4 hosts to dotted-decimal before
applying the security.http.urls policy so all encodings of an address
are treated alike.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 18:53:36 +02:00
Bjørn Erik Pedersen cf9c8f93ca Drop symlinks in os.ReadDir, os.ReadFile, os.Stat and os.FileExists
Fixes #15019
2026-06-10 18:53:36 +02:00
Bjørn Erik Pedersen 11f09f59fc Update CI workflow to exclude macOS
Removed macOS from the CI test matrix.
2026-06-09 14:34:07 +02:00
Joe Mooring 2602796cf1 commands: Fix convert command
Closes #15012
2026-06-09 13:02:26 +02:00
hugoreleaser 72495f9fba releaser: Prepare repository for 0.164.0-DEV
[ci skip]
2026-06-08 14:36:12 +00:00
hugoreleaser 4a9485336a releaser: Bump versions for release of 0.163.0
[ci skip]
v0.163.0
2026-06-08 14:13:03 +00:00
anupamojha-eng 1d018ef857 pagesfromdata: Use relative path for content adapter template metrics
Fixes #14999
2026-06-08 15:56:47 +02:00
Bjørn Erik Pedersen 121bc6ceb2 ci: Re-add macos-latest to the test matrix
I suspect there will be some disk space issue, but let's try.
2026-06-08 15:55:43 +02:00
dependabot[bot] 0d29fc81bb build(deps): bump github.com/bits-and-blooms/bitset
Bumps [github.com/bits-and-blooms/bitset](https://github.com/bits-and-blooms/bitset) from 1.24.4 to 1.24.5.
- [Release notes](https://github.com/bits-and-blooms/bitset/releases)
- [Commits](https://github.com/bits-and-blooms/bitset/compare/v1.24.4...v1.24.5)

---
updated-dependencies:
- dependency-name: github.com/bits-and-blooms/bitset
  dependency-version: 1.24.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 11:32:09 +02:00
dependabot[bot] bb57404f3d build(deps): bump github.com/tetratelabs/wazero
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.11.1-0.20260521072212-475a1f8f0dc3 to 1.12.0.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/commits/v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-version: 1.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 11:31:32 +02:00
Bjørn Erik Pedersen 781fabf4e4 all: Run go fix ./... 2026-06-07 21:20:40 +02:00
Bjørn Erik Pedersen cf18b827e2 images: Deprecate Imaging.Compression and move it down to webp and avif configs
Also clean up and simplify the image config handling.

Closes #14998
2026-06-07 21:20:16 +02:00
Bjørn Erik Pedersen 98ad9b3c03 Only support the latest Go version
Which is currently Go 1.26.

Closes #14997
2026-06-07 17:01:04 +02:00
Bjørn Erik Pedersen ff2903a931 resources/jsconfig: Remove deprecated baseUrl setting
baseUrl is deprecated in TypeScript and is no longer required when
paths is set (TypeScript 4.1+).

Fixes #14991
Closes #14996
2026-06-07 13:35:25 +02:00
dependabot[bot] 7d1b1fb33d build(deps): bump github.com/rogpeppe/go-internal from 1.14.1 to 1.15.0
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.14.1 to 1.15.0.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.14.1...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  dependency-version: 1.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-05 19:05:57 +02:00
Bjørn Erik Pedersen b89e7fe675 page: Add IsBranch and deprecate IsNode
IsNode's meaning was murky. Add IsBranch, defined as the set of branch
node kinds (home, section, taxonomy, term), and make IsNode a deprecated
alias for it.

Fixes #11574

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 16:18:57 +02:00
Bjørn Erik Pedersen e8fefc8388 images: Force cache invalidation for AVIF target
Fixes #14990
2026-06-05 16:18:23 +02:00
Bjørn Erik Pedersen a043d3ec63 images: Add a per-format AVIF hint setting
The hint setting controls WebP encoding (preset) and AVIF encoding
(chroma subsampling), but only lived on imaging.webp. Add imaging.avif.hint
so it shows up under the AVIF section in the docs, with the same root-level
backwards compatibility as imaging.webp.hint. Per-image hint now resolves
from the target format.

Fixes #14992

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 16:16:38 +02:00
dependabot[bot] 77a1147056 build(deps): bump github.com/getkin/kin-openapi from 0.138.0 to 0.139.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.138.0 to 0.139.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.138.0...v0.139.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-version: 0.139.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-05 16:16:00 +02:00
Bjørn Erik Pedersen 341f575d2d images: Make AVIF chroma subsampling content-aware via the hint
Encode photo/picture hints (and the default) as YUV420 instead of YUV444,
keeping 444 for text/icon/drawing. Lossless stays 444.

This roughly halves the encoder's peak memory (42 -> 27 MiB/MP) and the
output size, while 444 remains available for sharp-edged content. A
3000x3000 image now needs ~239 MiB to encode, down from ~381 MiB (which
sat right at the 384 MiB WASM cap).

Closes #14987

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 18:54:56 +02:00
Bjørn Erik Pedersen 248241b6e1 Cap AVIF lossy quality at 99
Before this commit, lossy compression with 100 quality meant lossless compression, leading to a big gap between 99 and 100.

This commit caps the lossy quality at 99, ensuring that lossy compression is always lossy.

Fixes #14981
2026-06-04 14:42:08 +02:00
Bjørn Erik Pedersen 4e47d95db9 config: Deprecate the glogal imaging quality setting
In favour of the new per-image quality setting.

See #14979
2026-06-04 11:07:34 +02:00
Bjørn Erik Pedersen 03b4b54220 images: Make 60 the default quality for AVIF
AVIF's quality scale is not perceptually comparable to JPEG/WebP:
libavif anchors its "good" default at 60, where Hugo's universal 75
produced visibly higher quality and larger files. AVIF now defaults to
60 while JPEG and WebP keep 75. An explicit imaging.quality,
imaging.avif.quality or a per-image qNN still wins.

Fixes #14979

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 11:07:34 +02:00
Bjørn Erik Pedersen 79be0532f1 livereload: Disconnect from websocket server on pageswap
Fixes #14983
2026-06-04 11:04:39 +02:00
Bjørn Erik Pedersen 0f440460c8 tpl/tplimpl/embedded: Prevent leading newline in sitemap template
Fixes #14977
2026-06-04 11:03:03 +02:00
Bjørn Erik Pedersen 4e17421ec2 images: Recover from memory alloc errors in WASM image processors
Fixes #14985
2026-06-04 11:01:49 +02:00
Bjørn Erik Pedersen b01ecd4cd4 images: Add quality setting per image format
Allow setting quality per output format via imaging.jpeg.quality,
imaging.webp.quality and imaging.avif.quality. Each falls back to the
global imaging.quality when unset, and a per-image qNN still wins.

Fixes #14957

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 20:43:55 +02:00
Joe Mooring ca68936d61 all: Adjust tests for deprecated link and image render hook settings 2026-06-01 15:52:34 +02:00
Joe Mooring 45c00b7c16 misc: Remove duplicate words in comments
Closes #14936
Closes #14950
Closes #14965
2026-05-29 17:54:14 +02:00
Bjørn Erik Pedersen 28d882ab70 Add some PNG to AVIF golden test cases
Both 8 and 24 bit PNG to AVIF with vivid colors.

The output looks good to me ...

https://discourse.gohugo.io/t/v0-162-0-avif-image-processing-strips-washes-out-colors-on-vector-graphics/57210
2026-05-29 11:28:27 +02:00
hugoreleaser b0fd7ee2e1 releaser: Prepare repository for 0.163.0-DEV
[ci skip]
2026-05-28 18:03:30 +00:00
hugoreleaser bba860e3ed releaser: Bump versions for release of 0.162.1
[ci skip]
v0.162.1
2026-05-28 17:40:44 +00:00
Joe Mooring 59f35cd985 modules/npm: Fix false stale warning after npm pack
Closes #14959

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 18:57:41 +02:00
Joe Mooring 21e9868fe2 tpl/tplimpl: Fix X shortcode test 2026-05-28 09:26:45 +02:00
Bjørn Erik Pedersen 2760288c6d tpl: Skip broken x shortcode test 2026-05-27 21:21:35 +02:00
Bjørn Erik Pedersen c270975049 Revert "tpl/collections: Make dict return nil when no values are provided"
This reverts commit 17a86ef5ed.

Closes #14958
2026-05-27 20:02:55 +02:00
Joe Mooring ea8b48af64 tpl/time: Fix locale-specific month abbreviations
Closes #14948
2026-05-27 12:38:21 +02:00
hugoreleaser 076dfe13d0 releaser: Bump versions for release of 0.162.0
[ci skip]
v0.162.0
2026-05-26 13:53:44 +00:00
Bjørn Erik Pedersen e41a06447d Disallow HTML content by default
For security reasons. Enable in security config, e.g.:

```toml
[security]
allowContent = ['.*']
```
2026-05-26 13:57:12 +02:00