-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOML dates no longer support equality tests against now
#9979
Comments
We have a similar issue in #9949 -- which is harder to fix (but that one has a good workaround). This one, though, is fixable. Thanks for the report and sorry about the site breakage. |
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib. Fixes gohugoio#9979
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib. Fixes gohugoio#9979
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib. Fixes gohugoio#9979
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib. Fixes gohugoio#9979 Updates gohugoio#8895
No worries about the breakage, just my blog so it's not the end of the world 😝 I had seen #9949 and thought they might be related, but it was different enough to raise seperately. |
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib. Fixes gohugoio#9979
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib. Fixes #9979
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I recently upgraded from an old version (in the 0.50's I think) and have noticed a problem with a template that does a filter against some data that's in TOML using dates.
I have items such as the following:
And use it in a template like so:
Upon upgrading to the latest version, the
where
condition no longer works, I'm assuming because the two types (the TOML date andnow
) can no longer be compared.Repo containing the full code is here: https://github.com/aaronpowell/aaronpowell.github.io
Relevant files are:
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes.
The text was updated successfully, but these errors were encountered: