Tips for filtering out future date publishing posts in Gatsby and tutorial.

7 replies
Last updated: Dec 3, 2020
I am following this tutorial by
user Y
and can’t seem to filter out the future date publishing posts. Any quick tips how I can do that? I tried following the
template on
but couldn’t figure it out
Dec 1, 2020, 4:58 PM
ah hm i see. I’ve been experimenting and testing out, on production unpublished post isn’t showing up but “future post” somehow did, but 404 when visited:
Dec 1, 2020, 5:54 PM
user Y
I’m not super verse in JS as a designer but i’ll try to retrofit your example into what I have here
Dec 1, 2020, 5:56 PM
just sharing my finding and discovery, i managed to make it work, not sure if its “correct” way to do things but now the post link appears correctly
Dec 2, 2020, 4:34 PM
This works, but you can also put the filter in the graphql query like we have done in the example I shared with you 🙂
Dec 3, 2020, 12:46 PM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?