Summary
In this chapter, we went through what it takes to hook your 11ty website up to a headless CMS. This gives us the ability to have a solid editing experience without sacrificing our developer experience. In fact, with some of the extra features that come with a CMS, we were able to remove the need for some instances of 11ty plugins.
To move to the CMS, we created our content model inside Hygraph. The content model lined up with the data we needed for our 11ty site. We created content inside of Hygraph and we created a query to get the content data via GraphQL inside Hygraph’s API playground. From there, we used 11ty’s configuration data API to fetch the data and changed our templates to use that data instead of the collection data. From there, the site was using the headless CMS, but we still wanted a seamless deployment, so we used webhooks in Hygraph and build hooks in Netlify to create a flow for when content is added or updated in Hygraph to build the site...