DEV Community

loading...

Discussion on: Dynamic Sitemaps with Contentful and Next.js a.k.a 'look ma no webhooks'

Collapse
mrispoli24 profile image
Mike Rispoli Author

Hi Asher,

So for this section of code the posts.items will come back as undefined if you don't have a content_type of posts inside your Contentful account. You would probably want to wrap that in an if statement in production in case your content_type returns no items. But you will likely have multiple types you want to add here for example posts, pages, categories, etc. Anything that represents a page that you want to expose to google.