Bjørn Erik Pedersen
70db201ed4
Add importContext option to css.Build, js.Build, css.Sass and css.TailwindCSS
...
This allows @import statements to be resolved in a set of user provided resources (e.g. from resources.FromString or css.ChromaStyles) before the assets filesystem.
The option also applies to css.PostCSS via the shared import inlining, and css.Sass requires the dartsass transpiler. The import context is part of the transformation cache key.
Fixes #15103
Co-authored-by: Claude Fable 5 <noreply@anthropic.com >
2026-08-03 21:20:06 +02:00
Bjørn Erik Pedersen
8a468df065
Remove some old deprecations
2026-07-29 20:48:47 +02:00
dependabot[bot]
b5fa03d3aa
build(deps): bump github.com/mattn/go-isatty from 0.0.22 to 0.0.24
...
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty ) from 0.0.22 to 0.0.24.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.22...v0.0.24 )
---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
dependency-version: 0.0.24
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-29 18:42:01 +02:00
dependabot[bot]
9da472dd3b
build(deps): bump github.com/yuin/goldmark from 1.8.4 to 1.8.5
...
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark ) from 1.8.4 to 1.8.5.
- [Release notes](https://github.com/yuin/goldmark/releases )
- [Commits](https://github.com/yuin/goldmark/compare/v1.8.4...v1.8.5 )
---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
dependency-version: 1.8.5
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-29 18:41:48 +02:00
Bjørn Erik Pedersen
615e45d6e8
Add css.ChromaStyles
...
Move the stylesheet generation from the gen chromastyles command into
markup/highlight and share it with the new template function.
Fixes #15112
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-29 18:41:31 +02:00
dependabot[bot]
635532a20f
build(deps): bump golang.org/x/tools from 0.47.0 to 0.48.0
...
Bumps [golang.org/x/tools](https://github.com/golang/tools ) from 0.47.0 to 0.48.0.
- [Release notes](https://github.com/golang/tools/releases )
- [Commits](https://github.com/golang/tools/compare/v0.47.0...v0.48.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/tools
dependency-version: 0.48.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-29 11:52:08 +02:00
Shantanav Mukherjee
a243a6154c
check.sh: Handle staticcheck not installed/in PATH
2026-07-28 12:31:02 +02:00
dependabot[bot]
9c71f600bf
build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.13 to 2.2.14
...
Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji ) from 2.2.13 to 2.2.14.
- [Release notes](https://github.com/kyokomi/emoji/releases )
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.13...v2.2.14 )
---
updated-dependencies:
- dependency-name: github.com/kyokomi/emoji/v2
dependency-version: 2.2.14
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-28 12:29:19 +02:00
dependabot[bot]
420527fc6b
build(deps): bump github.com/getkin/kin-openapi from 0.144.0 to 0.145.0
...
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi ) from 0.144.0 to 0.145.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases )
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.144.0...v0.145.0 )
---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
dependency-version: 0.145.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-28 12:28:40 +02:00
dependabot[bot]
7fe786e3b0
build(deps): bump golang.org/x/image from 0.43.0 to 0.44.0
...
Bumps [golang.org/x/image](https://github.com/golang/image ) from 0.43.0 to 0.44.0.
- [Commits](https://github.com/golang/image/compare/v0.43.0...v0.44.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/image
dependency-version: 0.44.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-27 17:44:56 +02:00
dependabot[bot]
03b244fc0b
build(deps): bump github.com/bep/imagemeta from 0.17.2 to 0.17.3
...
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta ) from 0.17.2 to 0.17.3.
- [Release notes](https://github.com/bep/imagemeta/releases )
- [Commits](https://github.com/bep/imagemeta/compare/v0.17.2...v0.17.3 )
---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
dependency-version: 0.17.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-27 17:44:44 +02:00
dependabot[bot]
961181334f
build(deps): bump github.com/tdewolff/minify/v2 from 2.24.13 to 2.24.14
...
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify ) from 2.24.13 to 2.24.14.
- [Release notes](https://github.com/tdewolff/minify/releases )
- [Commits](https://github.com/tdewolff/minify/compare/v2.24.13...v2.24.14 )
---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
dependency-version: 2.24.14
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-27 17:44:32 +02:00
dependabot[bot]
e35b7f049d
build(deps): bump github.com/yuin/goldmark from 1.8.2 to 1.8.4
...
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark ) from 1.8.2 to 1.8.4.
- [Release notes](https://github.com/yuin/goldmark/releases )
- [Commits](https://github.com/yuin/goldmark/compare/v1.8.2...v1.8.4 )
---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
dependency-version: 1.8.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-27 17:44:14 +02:00
Bjørn Erik Pedersen
7d90277a28
warpc: Improve AVIF error message on memory allocation failure
...
See https://discourse.gohugo.io/t/avif-conversion-fails-for-jpg-files-with-embedded-colour-profiles-when-not-resizing/57392/4
2026-07-27 17:44:01 +02:00
dependabot[bot]
0796fa7ace
build(deps): bump golang.org/x/net from 0.56.0 to 0.57.0
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.56.0 to 0.57.0.
- [Commits](https://github.com/golang/net/compare/v0.56.0...v0.57.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-version: 0.57.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-26 17:03:18 +02:00
Bjørn Erik Pedersen
6bf15241a1
Fix panic on server atomic save edits on MacOS
...
An atomic save (write temp file, rename into place) unlinks the inode the
watcher holds, so kqueue reports Remove for a file that's still on disk.
That took the delete branch and wiped the entire taxonomy subtree; the
following assemble then panicked in createMissingTaxonomies, where the
shifting tree.Get hit a not yet assembled *pageMetaSource.
Treat Remove of a path that still exists as an update, and use the
non-shifting GetRaw when checking for the auto created taxonomy node.
Fixes #15130
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-26 14:00:32 +02:00
Bjørn Erik Pedersen
861ede6d10
cache/filecache: Don't prune used cache entries with mixed-case dir names
...
On case-insensitive filesystems, entries created before we started lowercasing
the content paths in v0.123 are the same file as today's lowercased cache key,
and were removed on every hugo --gc.
Fixes #15101
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com >
2026-07-26 11:40:27 +02:00
Bjørn Erik Pedersen
f228c87d41
Drop symlinks in parent directories
...
Lstat only refrains from following the last element of a path, so a symlink
in an intermediate directory was still resolved, and reads could escape the
mount via e.g. resources.Get "symlinkdir/secret.txt".
Walk the directories up to the mount root and reject any that is a symlink.
Follow-up to cf9c8f93c and f8b5fa09a .
2026-07-25 18:17:06 +02:00
dependabot[bot]
1b701b72ca
build(deps): bump golang.org/x/text from 0.38.0 to 0.40.0
...
Bumps [golang.org/x/text](https://github.com/golang/text ) from 0.38.0 to 0.40.0.
- [Release notes](https://github.com/golang/text/releases )
- [Commits](https://github.com/golang/text/compare/v0.38.0...v0.40.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/text
dependency-version: 0.40.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-25 18:14:11 +02:00
dependabot[bot]
a32d70b712
build(deps): bump github.com/getkin/kin-openapi from 0.140.0 to 0.144.0
...
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi ) from 0.140.0 to 0.144.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases )
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.140.0...v0.144.0 )
---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
dependency-version: 0.144.0
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-25 18:13:45 +02:00
dependabot[bot]
948cfb98f9
build(deps): bump google.golang.org/grpc from 1.80.0 to 1.82.1
...
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go ) from 1.80.0 to 1.82.1.
- [Release notes](https://github.com/grpc/grpc-go/releases )
- [Commits](https://github.com/grpc/grpc-go/compare/v1.80.0...v1.82.1 )
---
updated-dependencies:
- dependency-name: google.golang.org/grpc
dependency-version: 1.82.1
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-25 18:12:39 +02:00
dependabot[bot]
8930802ef2
build(deps): bump golang.org/x/mod from 0.37.0 to 0.38.0
...
Bumps [golang.org/x/mod](https://github.com/golang/mod ) from 0.37.0 to 0.38.0.
- [Commits](https://github.com/golang/mod/compare/v0.37.0...v0.38.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/mod
dependency-version: 0.38.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-25 16:45:18 +02:00
Bjørn Erik Pedersen
7df45f615a
Delete .gemini
2026-07-25 11:30:55 +02:00
Joe Mooring
f961093ea9
markup/asciidocext: Fix TOC parsing for asciidoctor-html5s
...
Closes #15121
Co-authored-by: mike.szewil <szewil_michael@bah.com >
2026-07-22 19:32:19 +02:00
Joe Mooring
89b8c32200
common/hugo: Include non-go dependencies in go env output
...
Closes #15116
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-07-13 10:58:38 +02:00
Joe Mooring
984358f047
snap: Fix snap home environment
...
Closes #15114
2026-07-13 10:57:03 +02:00
Joe Mooring
d1f191c58d
Update README.md
...
- Remove Go Report Card badge (services has been sunset)
- Updated dependencies section
2026-07-13 10:56:09 +02:00
hugoreleaser
a198116669
releaser: Prepare repository for 0.165.0-DEV
...
[ci skip]
2026-07-06 17:47:51 +00:00
hugoreleaser
ce2470e701
releaser: Bump versions for release of 0.164.0
...
[ci skip]
v0.164.0
2026-07-06 16:39:30 +00:00
dependabot[bot]
921db7b52c
build(deps): bump github.com/JohannesKaufmann/html-to-markdown/v2
...
Bumps [github.com/JohannesKaufmann/html-to-markdown/v2](https://github.com/JohannesKaufmann/html-to-markdown ) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/JohannesKaufmann/html-to-markdown/releases )
- [Commits](https://github.com/JohannesKaufmann/html-to-markdown/compare/v2.5.1...v2.5.2 )
---
updated-dependencies:
- dependency-name: github.com/JohannesKaufmann/html-to-markdown/v2
dependency-version: 2.5.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-06 15:21:13 +02:00
dependabot[bot]
786ce71e59
build(deps): bump golang.org/x/tools from 0.45.0 to 0.47.0
...
Bumps [golang.org/x/tools](https://github.com/golang/tools ) from 0.45.0 to 0.47.0.
- [Release notes](https://github.com/golang/tools/releases )
- [Commits](https://github.com/golang/tools/compare/v0.45.0...v0.47.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/tools
dependency-version: 0.47.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-06 13:34:38 +02:00
dependabot[bot]
5ad2846161
build(deps): bump golang.org/x/image from 0.42.0 to 0.43.0
...
Bumps [golang.org/x/image](https://github.com/golang/image ) from 0.42.0 to 0.43.0.
- [Commits](https://github.com/golang/image/compare/v0.42.0...v0.43.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/image
dependency-version: 0.43.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-06 13:33:50 +02:00
dependabot[bot]
36ad9f583a
build(deps): bump golang.org/x/net from 0.55.0 to 0.56.0
...
Bumps [golang.org/x/net](https://github.com/golang/net ) from 0.55.0 to 0.56.0.
- [Commits](https://github.com/golang/net/compare/v0.55.0...v0.56.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-version: 0.56.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-06 11:50:17 +02:00
dependabot[bot]
7c0a0bc979
build(deps): bump github.com/pelletier/go-toml/v2 from 2.4.2 to 2.4.3
...
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml ) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/pelletier/go-toml/releases )
- [Commits](https://github.com/pelletier/go-toml/compare/v2.4.2...v2.4.3 )
---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
dependency-version: 2.4.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-06 11:49:16 +02:00
Bjørn Erik Pedersen
d83ce27ae0
tpl/tplimpl: Support sub paths in layouts passed to .Render
...
E.g. {{ .Render "foo/mylayout" }} matches mylayout templates in
<dir>/foo for every dir from the page's layout path up to the layouts root.
Closes #15056
Co-authored-by: Joe Mooring <joe.mooring@veriphor.com >
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-05 20:14:32 +02:00
Bjørn Erik Pedersen
5a5f4a5495
all: Rewrite deprecated constructs in tests
2026-07-04 23:10:26 +02:00
Bjørn Erik Pedersen
c6acc246ab
Add markup.rst.syntaxHighlight option
...
Fixes #5349
2026-07-04 22:27:29 +02:00
Bjørn Erik Pedersen
29ed932513
tpl/resources: Deprecate resources.PostProcess in favour of templates.Defer
...
Fixes #15086
2026-07-04 21:28:31 +02:00
Bjørn Erik Pedersen
7b4ddd1863
contributing: Add a note about co-authoring attributions when borrowing test cases
2026-07-04 18:10:03 +02:00
bejaratommy
671897ae91
tpl/collections: Include key in IsSet unsupported-type warning
...
The warning logged when calling IsSet with an unsupported type did not
identify which key triggered it, making it hard to locate the offending
template. Include the key in the message.
Fixes #11794
2026-07-04 15:18:42 +02:00
dependabot[bot]
a879ebfaaa
build(deps): bump github.com/getkin/kin-openapi from 0.139.0 to 0.140.0
...
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi ) from 0.139.0 to 0.140.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases )
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.139.0...v0.140.0 )
---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
dependency-version: 0.140.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-04 14:43:32 +02:00
sjh9714
499794d19e
create: Keep new content placeholders buildable
...
Fixes #15078
2026-07-04 14:31:54 +02:00
hexbinoct
feb3d494b9
hugolib: Use the output format's suffix for alias paths
...
Alias generation hardcoded "index.html" and only recognized a ".html"
suffix, so an alias with an explicit ".htm" extension (or any other
suffix configured for the html media type) was written to the wrong
path. For example "d.htm" produced the directory "d.htm/index.html"
instead of the file "d.htm".
Build the alias file name from the output format's BaseName and the
media type's first suffix, and detect an explicit file by matching the
alias extension against the configured suffixes. The same check now
drives the uglyURLs case in Aliases.
Fixes #15066
2026-07-04 14:31:34 +02:00
Bjørn Erik Pedersen
65c82178b7
hugio: Speedup hasBytesWriter
...
The old implementation copied the incoming bytes into a fixed-size buffer
one byte at a time, and for every byte ran bytes.Contains for every
pattern over the whole buffer. That's O(n·patterns) scans of the buffer,
which showed up badly on large output (a full rendered page).
Scan each not-yet-matched pattern once per Write with bytes.Contains over
the chunk itself, in place, rather than per byte. The only carried state
is a small boundary window (the last maxPatternLen-1 bytes) joined with
the head of the next chunk, so a pattern straddling a Write boundary is
still detected. The chunk is never copied, so the extra allocation is
bounded by the longest pattern and independent of the output size. Once
all patterns have matched we mark done and drop the buffer.
patternLen summed the pattern lengths (to size the old buffer); the
boundary window only needs the longest pattern, so it's renamed
maxPatternLen and returns the max.
```bash
│ benchcmp.bench │ fix-hasbytewriter.bench │
│ sec/op │ sec/op vs base │
HasBytesWriter-10 2473.095µ ± ∞ ¹ 6.114µ ± ∞ ¹ -99.75% (p=0.029 n=4)
¹ need >= 6 samples for confidence interval at level 0.95
│ benchcmp.bench │ fix-hasbytewriter.bench │
│ B/op │ B/op vs base │
HasBytesWriter-10 48.00 ± ∞ ¹ 128.00 ± ∞ ¹ +166.67% (p=0.029 n=4)
¹ need >= 6 samples for confidence interval at level 0.95
│ benchcmp.bench │ fix-hasbytewriter.bench │
│ allocs/op │ allocs/op vs base │
```
2026-07-04 13:25:35 +02:00
dependabot[bot]
332d5ec823
build(deps): bump golang.org/x/mod from 0.36.0 to 0.37.0
...
Bumps [golang.org/x/mod](https://github.com/golang/mod ) from 0.36.0 to 0.37.0.
- [Commits](https://github.com/golang/mod/compare/v0.36.0...v0.37.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/mod
dependency-version: 0.37.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-04 12:54:41 +02:00
dependabot[bot]
212cc11ada
build(deps): bump github.com/pelletier/go-toml/v2 from 2.3.1 to 2.4.2
...
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml ) from 2.3.1 to 2.4.2.
- [Release notes](https://github.com/pelletier/go-toml/releases )
- [Commits](https://github.com/pelletier/go-toml/compare/v2.3.1...v2.4.2 )
---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
dependency-version: 2.4.2
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-07-04 12:54:04 +02:00
Bjørn Erik Pedersen
dfb35dcd7a
tpl/crypto: Add crypto.Hash
...
Add a generic crypto.Hash template function returning the hex-encoded
checksum of a string using one of md5, sha1, sha256 (default), sha384 or
sha512. The supported algorithms match those used for the SRI hash in
.Data.Integrity on fingerprinted resources, so an SRI hash can be built
by composing with encoding.HexDecode and encoding.Base64Encode.
Fixes #15072
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-07-03 18:03:05 +02:00
Bjørn Erik Pedersen
ef053faa6a
Merge commit 'af91eb1997ace34ef5eed0be31646e8483b78096'
2026-07-03 10:43:53 +02:00
Bjørn Erik Pedersen
af91eb1997
Squashed 'docs/' changes from e17426e2b6..c85af679bf
...
c85af679bf content: Miscellaneous edits
43149dae59 content: Cleanup trailing spaces
2b161d600c content: Improve hosting guides
edc02f6402 content: Improve description of scheduled Cloudflare builds
83dff65d50 content: Fix typos
a93f8b956b content: Fix formatting
3dde5702c7 content: Add instructions for scheduled Cloudflare builds
b1075d9c77 content: Change wrangler config format in Cloudflare hosting guide
565d3292c3 content: Add .mjs and .cjs variants to mounted config files
4fc418d223 content: Update version references
bf2efc9114 content: Update hosting guides
0d8ff2dfe1 Update HUGO_VERSION to 0.163.3
git-subtree-dir: docs
git-subtree-split: c85af679bfe21dd7c01924c47933444f002bdc6b
2026-07-03 10:43:53 +02:00
Bjørn Erik Pedersen
a5ec542393
Add encoding.HexDecode/Encode
...
Fixes #15068
See #15060
2026-06-28 21:39:51 +02:00