11ty / 11ty-website

Documentation site for the Eleventy static site generator.
https://www.11ty.dev/
MIT License
473 stars 680 forks source link

Create eleventy-plugin-future-post.json #1652

Closed johnwargo closed 9 months ago

johnwargo commented 9 months ago

This is an Eleventy Plugin that allows you to set a future publishing date for one or more posts and not generate (publish) them until you build the site after the selected date.

The Eleventy Base Blog project has a drafts feather that allows you to work on a post within an Eleventy project without publishing it. You essentially assign a draft state to the post and Eleventy doesn't publish it during the build process until you remove the draft state.

For my use case, I wanted something different, I didn't want to manage the state of the document, I wanted the document to publish based on metadata in the post (the post date property). Described in better detail here: https://johnwargo.com/posts/2024/hiding-future-posts-eleventy/