One of the things I wanted when doing this blog was the ability to write post and have them published in the future. I also wanted a static site for the ease of maintaining and not worry about keeping the site up to date.
You will need to be using a static site generator that will only create the article on the a set publish date. I’m using Hugo for this site and it has a publishDate in the meta data on the article. If set Hugo will only create the article if its past that date.
Netlify has build hooks which you can call to trigger a rebuild.
Follow these steps to set it up
After logging into Netlify, start by clicking deploys
Then click deploy settings
Then scroll down to Build Hooks and click add build hook
Enter the name of the hook (doesn’t matter this is for you)
After hitting save copy the URL. This is the URL you will use to trigger the rebuild.
Click this and choose date & time
Click Every Day then choose your time
Click create trigger, and then click that.
Search for webhooks and click it
Paste your build hook url from netlify in the url field
Select POST Method, content type doesn’t matter and empty body.
Click Create Action and then finish This should trigger everyday at the time specified.
Now you need to add publishDate or whatever metadata your static generator requires to postpone creating the article till the specified date.