Closed jmooring closed 1 month ago
With this PR, front matter such as this...
publishDate = "2023-01-010"
...will throw an error such as:
invalid front matter: publishdate: 2023-01-010: see /home/jmooring/code/hugo-testing/content/posts/post-1.md
Note that unquoted TOML dates are already validated when unmarshaling front matter. This PR adds validation for the predefined front matter dates (TOML/YAML/JSON) when expressed as strings.
We already validate date fields in pages generated by content adapters by requiring time.Time
values in the dates
map, and the time.AsTime
template function validates the value.
Closes #10717