How to use Contentful integration in Plasmic?

I am working on a redesign of my blog using plasmic and had a few questions about the cms connection

My goal is to take the design I make in plasmic and end up with gatsby site that I can add blog posts to through contentful

My first question is when creating components in the studio builder, I’ve been using the following structure to incorporate the contentful fetcher:

Are there any best practices with regard to nesting the contentful fields? I used one outer “fetcher” element and then multiple fields nested within that, so that changing the entry ID would affect each of the sub-fields. Is this mostly correct?

And then the next part of my question is basically what would be the best way to create a homepage that is automatically populated when new contentful posts are created?

Hi, yep that structure looks right! And for the homepage, you should be able to query for a collection of posts. When you want it to update, you can just trigger a publish. Or you can use incremental static revalidation to have it periodically Auto refresh without giving up statically generated site performance.

Thanks for your advice. Is there a way to perform a query like that within plasmic studio or are you suggesting that I should add such a function by editing the react code in a local instance of the site? And if the suggestion is to move to a local instance do you think it would be better to use the headless export mode or the codegen mode? Thanks again for your help

When you publish new contentful content, you’ll need to kick off a new build of your Gatsby site; how exactly that works depends on where you’re hosting it, but contentful likely already have an integration for doing so. Plasmic in this case is not really involved, except that when the Gatsby site is built, it will be using the latest published designs from Plasmic.