Search code examples
content-management-systemstrapicontentfulnuxt-strapigatsby-strapi

What's the most efficient way to structure your landing page content in Strapi?


What's the most efficient way to structure your landing page content in Strapi? How good is it :

  • 1 collection type as 'home-screen'
  • Multiple components as 'heroSection', 'aboutSection', 'Footer'...

But with this way we get the api response as (Image attached) where we have to pick first elemnt of data array. I am curious if we ave any better solution than this where we get the required object only?

API response Postman

I tried to configure landing page data into the Strapi which so far works excellent, am just curious about how other developers are doing this.


Solution

  • I feel you are doing right with the way you started.

    On my side, I am using graphql so I don't feel I have the "pick first elemnt of data array" thing.

    If it can help/reassure you a bit, here how I am doing things:

    • Single Types: one per page (exception: I consider Header and Footer as "pages".. I only do one call for both of them on loading website)
    • Collection Types: Each "repetitive" section (such as "Question" on the Faq page, or "Question Category" that can contain several questions of the same category)
    • Components: custom blocks from micro to macro "level" (a bit of everything inside..)

    enter image description here enter image description here enter image description here