adrianhajdin / project_graphql_blog

With featured and recent posts, categories. full markdown articles, author information, comments, and much more, this fully responsive CMS Blog App is the best Blog Application that you can currently find on YouTube. And what's best of all is that you and your clients can manage the blog from a dedicated Content Management System.
https://jsmastery.pro
1.47k stars 347 forks source link

After creating a new post in GraphCMS, the new post doesn't appear in the deployed version #25

Closed fransachmadhw closed 2 years ago

fransachmadhw commented 2 years ago

That post appears only in localhost. In deployed version, it doesn't. A bit weird, that post doesn't appear on the home page and category page. However, in featured post cards and recent posts, it does. Anyone knows how to fix it?

JoBaHP commented 2 years ago

Where are you hosting your app?

fransachmadhw commented 2 years ago

Where are you hosting your app?

Vercel. Same as what he did in the video

JoBaHP commented 2 years ago

For me is because i am statically exporting my app to my host provider and is behavior i expect.

fransachmadhw commented 2 years ago

For me is because i am statically exporting my app to my host provider and is behavior i expect.

So, does the problem come from my code? Or from vercel?

kutukmu commented 2 years ago

I have the same issue right now, did you figure out the solution?

fransachmadhw commented 2 years ago

I have the same issue right now, did you figure out the solution?

Not yet haha

kutukmu commented 2 years ago

return { props: { posts }, revalidate: 10 }; try this

fransachmadhw commented 2 years ago

return { props: { posts }, revalidate: 10 }; try this

It works like a charm. I just discovered what revalidate does in next.js docs too. Thanks in advance

JerwellSavella commented 2 years ago

@kutukmu which file should I add this? should I create a new file? which folder should I add it to?

fransachmadhw commented 2 years ago

@kutukmu which file should I add this? should I create a new file? which folder should I add it to?

On page/index.js

JerwellSavella commented 2 years ago

@kutukmu which file should I add this? should I create a new file? which folder should I add it to?

On page/index.js

still doesn't work for me,

fransachmadhw commented 2 years ago

@kutukmu which file should I add this? should I create a new file? which folder should I add it to?

On page/index.js

still doesn't work for me,

@JerwellSavella see my repository as a reference https://github.com/fransachmadhw/blogshot-clone