Commit Graph

9588 Commits

Author SHA1 Message Date
hugoreleaser f41be7959a releaser: Bump versions for release of 0.158.0
[ci skip]
v0.158.0
2026-03-16 17:42:04 +00:00
Bjørn Erik Pedersen 0e46a97e8a deps: Upgrade github.com/evanw/esbuild v0.27.3 => v0.27.4 2026-03-16 18:39:08 +01:00
dependabot[bot] c27d9e8fcf build(deps): bump github.com/getkin/kin-openapi from 0.133.0 to 0.134.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.133.0 to 0.134.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.133.0...v0.134.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 11:59:42 +01:00
dependabot[bot] 098eac59a9 build(deps): bump golang.org/x/tools from 0.42.0 to 0.43.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.42.0 to 0.43.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.42.0...v0.43.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 11:56:42 +01:00
Bjørn Erik Pedersen 3c980c072e resources: Re-publish on transformation cache hit
When a resource transformation result was served from cache (same
options as a previous build), the output file was not re-written to
disk. This caused incorrect output when toggling transformation
options (e.g. minify) back to a previously seen value in server mode.

Fixes #14629
2026-03-15 18:32:41 +01:00
Joe Mooring 404ac00001 create/skeletons: Use css.Build in theme skeleton
Closes #14626
2026-03-15 16:51:24 +01:00
Bjørn Erik Pedersen 06fcb72421 tpl/css: Add a test case for rebuilds on CSS options changes 2026-03-15 11:09:02 +01:00
Joe Mooring 9b5f1d491d hugolib: Allow regular pages to cascade to self
Closes #14627
2026-03-15 10:17:45 +01:00
dependabot[bot] 87f8de8c7a build(deps): bump gocloud.dev from 0.44.0 to 0.45.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.44.0...v0.45.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-version: 0.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 16:06:09 +01:00
dependabot[bot] 67ef6c68de build(deps): bump golang.org/x/sync from 0.19.0 to 0.20.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/sync/compare/v0.19.0...v0.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 16:05:19 +01:00
Bjørn Erik Pedersen 623722bb07 tpl/css: Allow the user to override single loader entries
Fixes #14623

 Co-authored-by: Joe Mooring <joe.mooring@veriphor.com>
2026-03-14 15:17:21 +01:00
Bjørn Erik Pedersen e431f90bc6 tpl/css: Fix external source maps
Fixes #14620
2026-03-14 12:08:18 +01:00
Bjørn Erik Pedersen a7cbcf15f0 tpl/css: Make default loader resolution for CSS @import and url() always behave the same
Before this commit, we did dynamic loader resolution for CSS bundling for resources resolved by Hugo while any fallback to ESBuild would fall back to a (potentially) empty loaders config.

This revises the logic to always use a static list (see below) if `loaders` is not set. This should be easier do document and less confusing for the end user.

````
".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".avif",
".woff", ".woff2", ".ttf", ".eot", ".otf"
````

Fixes #14619
2026-03-13 20:24:32 +01:00
Joe Mooring 59e0446fe5 hugolib: Fix server no watch
Closes #14615

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 16:28:37 +01:00
Joe Mooring 36cdb2c789 internal/js: Add default mainFields for CSS builds
Closes #14614
2026-03-13 08:33:17 +01:00
Bjørn Erik Pedersen 3e3b849cc7 Add css.Build
Fixes #14609
Fixes #14613
2026-03-12 13:32:40 +01:00
Bjørn Erik Pedersen 1f578f160c Upgrade to to Go 1.26.1 (#14597) (note)
This fixes a security issue: https://www.cve.org/CVERecord?id=CVE-2026-27142

Closes #14595
2026-03-11 12:36:13 +01:00
Bjørn Erik Pedersen 842d8f1052 resources: Fix context canceled on GetRemote with per-request timeout
The per-request timeout context was cancelled via defer in the getRes
closure, before io.ReadAll(res.Body) in the outer scope could read
the response body. Fix this by returning the cancel function from
getRes so each caller manages its own cancel lifecycle.

Fixes #14611

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 19:45:14 +01:00
Bjørn Erik Pedersen c47ec23342 resources: Use full path for Exif etc. decoding error/warning messages
Fixes #12693
2026-03-08 23:03:57 +01:00
Bjørn Erik Pedersen 4652ae4a44 Move to new locales library and upgrade CLDR from v36.1 to v48.1
* I had all kinds of issues upgrading CLDR on the old library, so I decided to start fresh in github.com/bep/golocales
* It shaves off about 3 MB of the binary, and package init cost is zero compared to the old localescompressed (5000x faster).
* We will probably move to the `text/**` packages at this point, but this will have to do for now.
2026-03-08 21:43:37 +01:00
Bjørn Erik Pedersen 4eafd9eb7b tpl/tplimpl: Prefer early suffixes when media type matches
Fixes #13877
Close #14601

Co-Authored-By: Joe Mooring <joe.mooring@veriphor.com>
2026-03-08 21:42:36 +01:00
Joe Mooring 13a95b9c01 tpl/strings: Add strings.ReplacePairs function
Closes #14594
2026-03-07 20:21:02 +01:00
Bjørn Erik Pedersen e3108225bf all: Run go fix ./... 2026-03-07 18:30:42 +01:00
Bjørn Erik Pedersen c9b88e4d15 internal/warpc: Fix SIGSEGV in Close() when dispatcher fails to start
Only set started=true when Start() succeeds, so Close() doesn't
attempt to close a nil dispatcher.

Fixes #14536
2026-03-07 15:30:07 +01:00
Bjørn Erik Pedersen 54c804876a github: Remove pull_request_template.md
* Main reason is that it slows down my own `gh` workflow (I also frequently accidentally select that template).
* We also don't have a large volume of PRs from new contributors, so the template isn't as necessary.
2026-03-07 12:48:15 +01:00
Bjørn Erik Pedersen 157bfddda5 testing: Make commands tests pass in Go 1.26.1 2026-03-06 12:23:25 +01:00
Joe Mooring d4f2122dea refactor: Deprecate language configuration and template methods
Configuration:

- languageCode      -> locale (either in root or per-language)
- languageName      -> label
- languageDirection -> direction

Methods:

- .Language.LanguageCode      -> .Language.Locale
- .Language.LanguageName      -> .Language.Label
- .Language.LanguageDirection -> .Language.Direction
- .Site.LanguageCode          -> .Site.Language.Locale

Example configuration:

[languages.en]
  direction = 'ltr'
  label     = 'English'
  locale    = 'en-US'
  weight    = 1

Closes #14269

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 11:45:52 +01:00
Bjørn Erik Pedersen 991d2f9aba Replace Exif with Meta in tests 2026-03-04 11:38:28 +01:00
dependabot[bot] b29c2f7ade build(deps): bump golang.org/x/net from 0.50.0 to 0.51.0 (#14569)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.50.0 to 0.51.0.
- [Commits](https://github.com/golang/net/compare/v0.50.0...v0.51.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 13:01:37 +01:00
dependabot[bot] e91d191155 build(deps): bump github.com/tdewolff/minify/v2 from 2.24.9 to 2.24.10 (#14585)
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.24.9 to 2.24.10.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.24.9...v2.24.10)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-version: 2.24.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 12:57:29 +01:00
dependabot[bot] a8a54bd020 build(deps): bump github.com/bep/imagemeta from 0.15.0 to 0.17.0 (#14584)
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta) from 0.15.0 to 0.17.0.
- [Release notes](https://github.com/bep/imagemeta/releases)
- [Commits](https://github.com/bep/imagemeta/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
  dependency-version: 0.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 12:57:10 +01:00
Bjørn Erik Pedersen f797f84902 Fix index out of range panic in fileEventsContentPaths
The nested loop had dirs as the outer loop and others as the inner loop
with a single counter, causing n to exceed len(others) when multiple
dirs existed. Swap the loop order so each file in others is checked
against all dirs exactly once.

Fixes #14573

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 12:05:13 +01:00
Joe Mooring e8577771c3 resources: Improve getImageOps error message
Closes #14571
2026-02-26 22:20:08 +01:00
Bjørn Erik Pedersen 44dc3847f4 resources/images: Add IsImageResourceWithMeta etc. tests for bmp and gif
Closes #14568
2026-02-26 16:49:11 +01:00
hugoreleaser 5594b28229 releaser: Prepare repository for 0.158.0-DEV
[ci skip]
2026-02-25 16:57:59 +00:00
hugoreleaser 7747abbb31 releaser: Bump versions for release of 0.157.0
[ci skip]
v0.157.0
2026-02-25 16:38:33 +00:00
Bjørn Erik Pedersen 3dff7c8c7a Fix menu pageRef resolution in multidimensional setups
Fixes #14566
2026-02-25 17:35:20 +01:00
Bjørn Erik Pedersen d98cd4aecf Handle GitInfo for modules where Origin is not set when running go list
This is an upstream bug, but this workaround seem to work fine.

Fixes #14564
2026-02-25 14:26:50 +01:00
Joe Mooring 68059972e8 commands: Update link to highlighting style examples
Closes #14556
2026-02-25 12:57:25 +01:00
Bjørn Erik Pedersen 8e28668b09 docs: Regen and fix the imaging docshelper output
Fixes #14562
2026-02-25 10:43:58 +01:00
Bjørn Erik Pedersen a3ea9cd18f Merge commit '0c2fa2460f485e0eca564dcccf36d34538374922' 2026-02-25 10:29:05 +01:00
Bjørn Erik Pedersen 0c2fa2460f Squashed 'docs/' changes from 42914c50e..80dd7b067
80dd7b067 theme: Fix border class in render-codeblock template
0d3fde6c9 content: Fix typo
23a4adb29 content: More site => project changes
9243e9f6b content: Rename site configuration to project configuration (phase 2)
330aa2249 content: Miscellaneous edits
25ce893be content: Clarify sort order with PAGE.Rotate
b398506dc content: Various dimension improvements
c54573d13 content: Use singular form in method section descriptions
d9a95fe54 content: Improve description of PAGE.Rotate
154f30600 content: Fix link
c71bd2776 content: Address Markdown linting error
72c88e68e content: Improve pages related to content dimensions
b85afa645 content: Fix formatting
7aaca8947 content: More site-to-project changes
8e1579030 content: Update quick start guide
f7ba1fde2 content: Make new-in into a note
8b9d51584 theme: Address TailwindCSS warnings
3a4c2a25c theme: Address Hugo v0.156.0 deprecations
4f1a2bd7b content: Improve glossary entries
21bcd23a6 content: Update glossary entry
c72ef1116 content: Update quick start guide
c0737ffab content: Add typography plugin to TailwindCSS example
80bcb868e content: Remove Site.AllPages from examples
2b9ba5831 content: Replace Page.Sites and Site.Sites with hugo.Sites
2cdcc2556 content: Remove outdated badges
5a4beb530 content: Replace Site.Data with hugo.Data
de4651b5d content: Update glossary entry
2302825a7 content: Add hugo.Data and note other deprecations
bac5da4b5 content: Add hugo.Sites and update the other Sites methods
0f7d99153 content: Add Site.IsDefault
f888f33bb content: Update glossary entries
65311c2de content: Include the "build" subcommand where appropriate
4991320d2 content: Standard shell language code in info strings
b16d9f162 theme: Style todo lists
f121450c6 content: Update version references
5a81dd8c2 content: Update CLI documentation
f3ae0ce86 content: Rename site configuration to project configuration (phase 1)
9c8327119 content: Miscellaneous edits
fbff91e22 Update HUGO_VERSION to 0.156.0
2ec625ae8 content: Restore snap installation instructions
fc8c246b8 content: Clarify module initialization

git-subtree-dir: docs
git-subtree-split: 80dd7b067c31c28b13c51f3ac4636890509a4bb7
2026-02-24 21:38:42 +01:00
Bjørn Erik Pedersen 49bfb1070b Add AVIF, HEIF and HEIC partial support (only metadata for now)
* Add AVIF, HEIF and HEIC partial support

* Add them as media types.
* Support reading metadata (Width, Height, Exif, etc.) from these formats.
* Add a new template function IsImageResourceMeta to check if a resource supports image metadata operations, which will return true for AVIF, HEIF and HEIC resources even if they don't support full image operations yet.

Fixes #14549
2026-02-24 19:45:12 +01:00
Joe Mooring b7203bbb3a resources/images: Adjust WebP processing defaults
defaultWebpUseSharpYuv: true => false
defaultWebpMethod: 4 => 2
2026-02-24 10:02:48 +01:00
Bjørn Erik Pedersen dfece5b674 Add Page.GitInfo support for content from Git modules
Use blobless git clone (--filter=blob:none --no-checkout) to fetch
commit history for content from Git modules, then map it using the
existing gitmap library.  Cloned repos are cached in the modulegitinfo file cache.

Closes #14431
Fixes #5533
2026-02-23 17:43:17 +01:00
Paul van Brouwershaven 2d691c7e47 Add per-request timeout option to resources.GetRemote 2026-02-23 16:38:13 +01:00
Bjørn Erik Pedersen b96d58a144 Update AI Watchdog action version in workflow 2026-02-23 15:05:07 +01:00
dependabot[bot] 9869e71aaa build(deps): bump github.com/tdewolff/minify/v2 from 2.24.8 to 2.24.9
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.24.8 to 2.24.9.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.24.8...v2.24.9)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-version: 2.24.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-23 12:23:59 +01:00
dependabot[bot] 8f47fe8c87 build(deps): bump github.com/bep/imagemeta from 0.14.0 to 0.15.0
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/bep/imagemeta/releases)
- [Commits](https://github.com/bep/imagemeta/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
  dependency-version: 0.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-23 12:23:01 +01:00
Bjørn Erik Pedersen 65b4287c68 config: Skip taxonomy entries with empty keys or values
When non-taxonomy keys (e.g. disableKinds = []) are placed after
[taxonomies] in TOML, they become part of the taxonomies table.
An empty-valued entry creates a phantom taxonomy with an empty
pluralTreeKey, causing .Ancestors to loop indefinitely.

Fixes #14550

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 12:22:39 +01:00