You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In frontmatter, dates can be quoted as strings, or unquoted.
The Jekyll migration tool works for the case when the date is quoted, but it has no test coverage for unquoted dates and crashes in that case.
The difference is that the front-matter library will parse the date directly into a date object if it's not quoted. Because the importing code only expects strings, it fails like this:
TypeError: frontmatterAttributes.date.match is not a function
To trigger it in the test suite, add a post with a date formatting like this:
date: 2022-06-05
(With no quotes around the date!)
Look into this uncovered another minor issue with date handing: If front-matter parses a date with no time, it will set the time to midnight. But if the Jekyll importing code parses a date with no time as string, the time gets set to noon. For consistency, the importing code should just not set the hour, minute and second fields in the date object so the default values are used.
The text was updated successfully, but these errors were encountered:
markstos
added a commit
to markstos/migrate
that referenced
this issue
Jun 7, 2022
In frontmatter, dates can be quoted as strings, or unquoted.
The Jekyll migration tool works for the case when the date is quoted, but it has no test coverage for unquoted dates and crashes in that case.
The difference is that the
front-matter
library will parse the date directly into a date object if it's not quoted. Because the importing code only expects strings, it fails like this:To trigger it in the test suite, add a post with a date formatting like this:
(With no quotes around the date!)
Look into this uncovered another minor issue with date handing: If
front-matter
parses a date with no time, it will set the time to midnight. But if the Jekyll importing code parses a date with no time as string, the time gets set to noon. For consistency, the importing code should just not set the hour, minute and second fields in the date object so the default values are used.The text was updated successfully, but these errors were encountered: