Files
hugo/tpl
Bjørn Erik Pedersen d4c78885ae Fix it so YAML integer types can be used where Go int types are expected
E.g. in date.AddDate.

In Hugo v0.152.0 we moved to a new YAML library (github.com/goccy/go-yaml) which produces uint64 for unsigned integers.

This unfortunately breaks common constructs like:

  .Date.AddDate 0 0 7

when .Date is a time.Time and the integers are unmarshaled from YAML front matter.

This commit adds code to handle conversion from uint64 (and other int types) to the required int types where possible.

Fixes #14079
2025-10-22 21:04:39 +02:00
..
2024-08-06 22:26:43 +02:00
2024-07-06 14:08:15 +02:00
2025-02-26 11:44:25 +01:00
2023-02-25 19:53:18 +01:00
2024-12-12 21:43:17 +01:00
2023-02-25 19:53:18 +01:00
2024-12-16 11:52:18 +01:00
2024-01-28 23:14:09 +01:00
2025-02-08 10:31:15 +01:00
2025-01-05 15:32:21 +01:00
2025-04-03 09:45:51 +02:00
2024-04-11 09:31:33 +02:00