ssg
ssg copied to clipboard
SSG should skip entries that are future dated
I just got an error on my site because SSG tried to publish a news article that was set to be published later on.
I see there is a filter to check if the page is published:
public function isGeneratable()
{
return $this->content->published();
}
Maybe we can add a filter to check if the content is also meant to be published now or in the future?
public function isGeneratable()
{
// if ($this->content->date && $this->content->date()->isFuture()) return false;
return $this->content->published();
}
But I'm not sure if we need additional checks to see if the content is an Entry, and not a page, taxonomy, whatever collection type that doesn't have a date.