Floating Dots
Illustration of a woman is standing in front of clock

Post Scheduler for Sanity and Gatsby website with Airtable


We published a GitHub repo for Sanity + Gatsby site's scheduled posts system using Airtable.

This allows you to schedule posts without using tools for developers such as Github. Contributors have to do is specify a future date and time in the CMS to complete it.

You can also check the status of your scheduled posts in Airtable to see when they are scheduled to be published, and they have been published or not.

Headless CMS's appointment posting

A typical HeadlessCMS booking post is

A. Build at the time of scheduled post submission, generate the data, and show and hide it on frontend.

B. Build and publish the post when it's time for a scheduled post.

A is easy, but you can view unpublished posts from the source code because the post data (such as JSON file) is published before the publishing time.
In method B, you need to manage post published time and run a build on it or build every minute or hour.
Building regularly is not a good way. It wastes the resources of Serverless Functions.
Most of gatsby's website, which has deployed to Now and Netlify, doesn't have a database, so we use Airtable. Functions work with Now Lambda.

You can find the source code in this repository.

https://github.com/naotone/gatsby-sanity-post-scheduler


Let's talk about your project!👇