Closed leviem1 closed 3 years ago
Thanks for suggesting a change. I'm personally more in favour of catching this error and giving a clearer error on where to add a date.
How does it behave for non-draft posts without date?
Turns out not including a date in a non-draft post is handled gracefully. There may be some clues there as to how we can avoid this issue, as long as the behavior isn't "just ignore it", since that'd make the drafts invisible again.
Jekyll doesn't require dates for drafts to be rendered, so it would be a bit jarring to force users to start dating their drafts.
Hey, just checking in on whether or not you've seen my PR. I assume you're busy so I understand if it's lower priority, but wanted to make sure this didn't fall off the radar.
Thanks for everything!
I've released this under 1.7.1, thanks for the PR!
I want to report a bug:
What is the current behavior?
In the recent 1.7.0 release, drafts without a date throw the following exception when using
--drafts
.What is your expected behavior?
The current date should be used when generating the url rather than trying to get the date of the file. Not sure how Jekyll does this internally, but we could probably use their approach.
Git repository to reproduce the issue:
Issue Workaround
Ruby version used:
I'm using the jekyll:builder docker image to build my site, so I'm not actually certain, but I doubt it matters here.
Jekyll version used:
3.9.0
Note
Since I was the one that pushed for the inclusion of this feature, didn't do my due diligence in testing it, and it's now affecting my projects, I'll more than gladly lead the way on getting this resolved, rather than just having the feature be reverted.