APIs are marvelous. We can encapsulate the most complicated functionality behind an easy-to-use API, and its users don’t need to know the logic or the details of how an API works. Chapter 9 went over some APIs provided by third parties, which worked for us. But it is not always possible to get APIs for everything we need. Some functionality might be particular to our website or be our secret sauce. We need to write this ourselves. The Jamstack identifies that as a valid and practical use case and provides support for this functionality.
In this chapter, we will go over some of the means that the Jamstack provides to handle cases where Hugo might not have the features we need (figure 11.1). We will embed LaTeX-based math inside our project—the Jamstack way—compiled during the build and delivered without any excess JavaScript or additional network request. The conversion from textual to a visual representation of the mathematics will be done outside Hugo and integrated into the web page at build time. We will also look at the concept of webhooks and how we can use them to link together independent services.