Skip to content
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

SSG should skip entries that are future dated #132

Open
tao opened this issue May 16, 2023 · 0 comments
Open

SSG should skip entries that are future dated #132

tao opened this issue May 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tao
Copy link
Contributor

tao commented May 16, 2023

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.

@duncanmcclean duncanmcclean added the bug Something isn't working label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants