Integrating 11ty with a Headless CMS
One of the great things about 11ty is that it can be an all-in-one solution for people looking to publish content, do a little development work, and generate HTML; but what if you don’t want to store your content in Markdown in your repository? Enter the world of headless content management systems (CMSs).
In this chapter, we’ll take our podcast website and add the headless CMS Hygraph as a data source. By decoupling our content from our code, we get a couple of superpowers from Hygraph that allow us to simplify our code, while at the same time simplifying our content editing and writing process. In doing this, we’ll explore what a headless CMS is, how to create proper data via content modeling, and how to get that data into our 11ty site. Finally, we’ll automate the process of publishing the site by setting it to trigger when a new CMS entry is added or updated to keep our publishing flow simple and clean.