Commit graph

8469 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
69455fa422
Fix deprecation errors 2024-08-05 19:23:53 +02:00
hugoreleaser
2fcc53780f releaser: Prepare repository for 0.132.0-DEV
[ci skip]
2024-08-02 09:18:21 +00:00
hugoreleaser
bfbee17932 releaser: Bump versions for release of 0.131.0
[ci skip]
2024-08-02 09:03:48 +00:00
Bjørn Erik Pedersen
944fcc216f Fix images.AutoOrient regression
Broken in v0.130.0. Added a integration test to avoid future breakage.

Fixes #12712
2024-08-02 10:36:06 +02:00
n1xx1
914fa13efd revamp pagegroup tests with quicktest 2024-08-02 10:03:20 +02:00
n1xx1
51f09b17fd allow nested params when using Pages.GroupByParam and Pages.GroupByParamDate 2024-08-02 10:03:20 +02:00
dependabot[bot]
be643580dd build(deps): bump github.com/bep/godartsass/v2 from 2.0.0 to 2.1.0
Bumps [github.com/bep/godartsass/v2](https://github.com/bep/godartsass) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/bep/godartsass/releases)
- [Commits](https://github.com/bep/godartsass/compare/v2.0.0...v2.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 00:36:13 +02:00
dependabot[bot]
20e4dd2ee3 build(deps): bump google.golang.org/api from 0.152.0 to 0.189.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.152.0 to 0.189.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.152.0...v0.189.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 19:57:38 +02:00
dependabot[bot]
f41149979a build(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:34:22 +02:00
dependabot[bot]
47fee839f6 build(deps): bump gocloud.dev from 0.36.0 to 0.38.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.36.0 to 0.38.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.36.0...v0.38.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:33:35 +02:00
dependabot[bot]
99665ef227 build(deps): bump github.com/gorilla/websocket from 1.5.1 to 1.5.3
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.5.1...v1.5.3)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:32:47 +02:00
dependabot[bot]
eb2eeee687 build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.12 to 2.2.13
Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji) from 2.2.12 to 2.2.13.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.12...v2.2.13)

---
updated-dependencies:
- dependency-name: github.com/kyokomi/emoji/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:31:38 +02:00
Bjørn Erik Pedersen
bea5a46de4 deps: Upgrade github.com/hairyhenderson/go-codeowners v0.4.0 => v0.5.0 2024-08-01 14:46:54 +02:00
dependabot[bot]
f1a7f3d01a build(deps): bump github.com/fatih/color from 1.16.0 to 1.17.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 14:46:13 +02:00
dependabot[bot]
08243be1d2 build(deps): bump github.com/evanw/esbuild from 0.21.4 to 0.23.0
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.21.4 to 0.23.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.4...v0.23.0)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:43:28 +02:00
dependabot[bot]
0490a8a162 build(deps): bump github.com/tdewolff/minify/v2 from 2.20.36 to 2.20.37
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.36 to 2.20.37.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.36...v2.20.37)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:14:38 +02:00
Bjørn Erik Pedersen
d795cacd71
Revert "deps: Set toolchain go1.21.0 in go.mod"
This reverts commit 78c9a18b0c.
2024-08-01 13:04:29 +02:00
Bjørn Erik Pedersen
a5db76fe62
Run go mod tidy 2024-08-01 12:22:27 +02:00
n1xx1
566fe7ba12
resources/page: Expand parmalinks tokens in url
This change allows to use permalink tokens in url front matter fields. This should be useful to target more specific pages instead of using a global permalink configuration. It's expected to be used with cascade.

Fixes #9714
2024-08-01 12:14:29 +02:00
Bjørn Erik Pedersen
92573012e8 Bump to go 1.21 in go.mod 2024-08-01 12:07:27 +02:00
Bjørn Erik Pedersen
071f8b4466 tpl: Sync Go template packages with the Go 1.22.5 source 2024-08-01 12:07:27 +02:00
Bjørn Erik Pedersen
ae9d5e7d83 Upgrade to Go 1.22.5 2024-08-01 12:07:27 +02:00
Bjørn Erik Pedersen
78c9a18b0c deps: Set toolchain go1.21.0 in go.mod
To hopefully resolve dependabot issues.
2024-07-31 19:47:41 +02:00
Bjørn Erik Pedersen
79aa2ab618 deps: Upgrade golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d => v0.23.0
Main motivation is to try to get dependabot running again.
2024-07-31 18:52:13 +02:00
Bjørn Erik Pedersen
216a69a1ef Shorten processed image filenames
Fixes #12688
Fixes #12656
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
e67886c038 Consolidate all hashing to the common/hashing package
And remove now unsued hashing funcs.
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
d5eda13cb2 Replace the MD5 hashing of images with xxHash
Note that we only use this for change detection.

The previous implementation invoked `MD5FromReaderFast` that created a MD5 has from 8 64 bytes chunks in the file, which is obviously very fast. The new implementation creates the hash from the entire file and ... seems to be even more effective:

```
name          old time/op    new time/op    delta
HashImage-10    9.45µs ±21%   10.89µs ± 1%     ~     (p=0.343 n=4+4)

name          old alloc/op   new alloc/op   delta
HashImage-10      144B ± 0%        8B ± 0%  -94.44%  (p=0.029 n=4+4)

name          old allocs/op  new allocs/op  delta
HashImage-10      4.00 ± 0%      1.00 ± 0%  -75.00%  (p=0.029 n=4+4)
```
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
8b5d796989 resources: Add BenchmarkHashImage 2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
c9d7577cb4 deps: Replace github.com/mitchellh/hashstructure/v2 with github.com/gohugoio/hashstructure
The old repo is archived and no longer maintained.

See #11644
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
2babd6404e identity: Use xxHash in hashstructure (note)
```
name                 old time/op    new time/op    delta
HashString/n28-10       133ns ± 9%     107ns ±10%  -19.58%  (p=0.029 n=4+4)
HashString/n112-10      243ns ± 5%     121ns ± 4%  -50.08%  (p=0.029 n=4+4)
HashString/n448-10      698ns ± 3%     174ns ± 5%  -75.02%  (p=0.029 n=4+4)
HashString/n1792-10    2.58µs ± 4%    0.38µs ± 4%  -85.11%  (p=0.029 n=4+4)
HashString/n7168-10    10.0µs ± 3%     1.3µs ± 4%  -86.91%  (p=0.029 n=4+4)

name                 old alloc/op   new alloc/op   delta
HashString/n28-10       80.0B ± 0%     72.0B ± 0%  -10.00%  (p=0.029 n=4+4)
HashString/n112-10       160B ± 0%      152B ± 0%   -5.00%  (p=0.029 n=4+4)
HashString/n448-10       496B ± 0%      488B ± 0%   -1.61%  (p=0.029 n=4+4)
HashString/n1792-10    1.84kB ± 0%    1.83kB ± 0%   -0.43%  (p=0.029 n=4+4)
HashString/n7168-10    8.24kB ± 0%    8.23kB ± 0%   -0.06%  (p=0.029 n=4+4)

name                 old allocs/op  new allocs/op  delta
HashString/n28-10        4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
HashString/n112-10       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
HashString/n448-10       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
HashString/n1792-10      4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
HashString/n7168-10      4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
```
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
78db8aebca identity: Upgrade to github.com/mitchellh/hashstructure/v2 v2.0.2
```
name                 old time/op    new time/op    delta
HashString/n28-10       131ns ± 7%     133ns ±19%   ~     (p=0.343 n=4+4)
HashString/n112-10      237ns ± 5%     241ns ± 3%   ~     (p=0.229 n=4+4)
HashString/n448-10      688ns ± 3%     687ns ± 1%   ~     (p=0.886 n=4+4)
HashString/n1792-10    2.51µs ± 3%    2.56µs ± 3%   ~     (p=0.200 n=4+4)
HashString/n7168-10    10.1µs ± 2%    10.0µs ± 4%   ~     (p=0.686 n=4+4)

name                 old alloc/op   new alloc/op   delta
HashString/n28-10       80.0B ± 0%     80.0B ± 0%   ~     (all equal)
HashString/n112-10       160B ± 0%      160B ± 0%   ~     (all equal)
HashString/n448-10       496B ± 0%      496B ± 0%   ~     (all equal)
HashString/n1792-10    1.84kB ± 0%    1.84kB ± 0%   ~     (all equal)
HashString/n7168-10    8.24kB ± 0%    8.24kB ± 0%   ~     (all equal)

name                 old allocs/op  new allocs/op  delta
HashString/n28-10        4.00 ± 0%      4.00 ± 0%   ~     (all equal)
HashString/n112-10       4.00 ± 0%      4.00 ± 0%   ~     (all equal)
HashString/n448-10       4.00 ± 0%      4.00 ± 0%   ~     (all equal)
HashString/n1792-10      4.00 ± 0%      4.00 ± 0%   ~     (all equal)
HashString/n7168-10      4.00 ± 0%      4.00 ± 0%   ~     (all equal)
```

Closes #11644
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
3140e0b994 identity: Add BenchmarkHashString 2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
9989404d97 deps: Upgrade github.com/bep/imagemeta v0.7.4 => v0.7.5 2024-07-31 15:35:18 +02:00
Bjørn Erik Pedersen
b81ba2a0f0 deps: Upgrade github.com/aws/aws-sdk-go-v2 v1.26.1 => v1.30.3 2024-07-31 14:22:20 +02:00
Bjørn Erik Pedersen
afdd87db59 deps: Upgrade to github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 2024-07-31 12:53:27 +02:00
hugoreleaser
e45eae4d67 releaser: Prepare repository for 0.131.0-DEV
[ci skip]
2024-07-29 14:06:20 +00:00
hugoreleaser
9b1b11c8a5 releaser: Bump versions for release of 0.130.0
[ci skip]
2024-07-29 13:51:56 +00:00
raoulb
9d2b5f98d0
math: Add trigonometric functions and some angle helper functions
This commit adds these new template functions in the `math` namespace:

math.Acos
math.Asin
math.Atan
math.Atan2
math.Cos
math.Pi
math.Sin
math.Tan
math.ToDegrees
math.ToRadians

Co-authored-by: Joe Mooring <joe@mooring.com>
2024-07-29 11:05:36 +02:00
Bjørn Erik Pedersen
0e00561620
deps: Upgrade github.com/bep/imagemeta v0.7.3 => v0.7.4 2024-07-23 20:46:05 +02:00
Bjørn Erik Pedersen
71842140d0 deps: Upgrade github.com/bep/imagemeta v0.7.1 => v0.7.3 2024-07-21 21:44:48 +02:00
Bjørn Erik Pedersen
cb95a033c1
readme: Pull the star history down a little 2024-07-20 17:46:48 +02:00
Bjørn Erik Pedersen
3240511153
deps: Upgraded github.com/bep/imagemeta v0.7.0 => v0.7.1
Fixes #12669
2024-07-20 17:28:47 +02:00
Bjørn Erik Pedersen
72ff937e11 Switch EXIF library
Closes #10855
Closes #8586
Closes #8996
2024-07-20 15:56:10 +02:00
Bjørn Erik Pedersen
a28bed0817
readme: Add Star History 2024-07-20 15:37:22 +02:00
hugoreleaser
979423f4d5 releaser: Prepare repository for 0.130.0-DEV
[ci skip]
2024-07-17 13:42:58 +00:00
hugoreleaser
e85be29867 releaser: Bump versions for release of 0.129.0
[ci skip]
2024-07-17 13:29:16 +00:00
Bjørn Erik Pedersen
4d8bfa7f1c
tpl: Use xxHash instead of MD5 to hash the deferred templates
Motivation is performance. These templates are typically very small, so the win is minor, I guess.
2024-07-17 12:51:49 +02:00
Bjørn Erik Pedersen
f0ed91caba Throw error if resources.PostProcess is used in a deferred template
That just doesn't work.

See #12655
2024-07-17 12:47:25 +02:00
Bjørn Erik Pedersen
7be0377505 deps: Upgrade github.com/bep/gitmap v1.4.0 => v1.6.0 (note)
Closes #8627
2024-07-17 10:54:28 +02:00
Bjørn Erik Pedersen
439f07eac4 deps: Go mod tidy 2024-07-08 23:53:23 +02:00