1 The Jamstack and Hugo

The Jamstack and Hugo #

This chapter covers

  • Jamstack basics for building websites
  • Principles of static site generators
  • Understanding the Hugo static site generator
  • Benefits of the Hugo static site generator
  • Use cases best suited for Jamstack and Hugo

If you have been associated with websites recently or have friends in similar situations, you must know how much work is involved in maintaining a website. It needs DevOps engineers, system administrators, and database architects to keep a website running on the internet. It is a full-time job for an entire team, not just an individual. The upkeep of content is so time-consuming that the creators move at an unprecedented rate to managed hosting services like WordPress.com or even to give away their content to platforms like Medium or Facebook.

Jamstack is a web development architecture that minimizes the day-to-day overhead of maintaining websites by moving the complicated pieces out of run time or by encapsulating them into easier-to-manage services. The term Jamstack was coined by the cofounder and CEO of Netlify, Matt Biilmann, in 2016. Jamstack forgoes databases by storing all the content into files compiled during deployment and then distributing them over a content delivery network (CDN). Application programming interfaces (APIs) provide dynamic, server-based content, maintained by third parties or hosted by cloud service providers with minimal day-to-day involvement by the website owner. This way, developers are freed from the tasks of handling security updates, denial-of-service (DoS) attacks, and constant monitoring to keep hackers at bay.

Jamstack is heavily reliant on the core web technologies of HTML, CSS, and JavaScript. It offers the ability to get up and running on the modern web quickly so we can build websites with outstanding performance, low cost, and little maintenance. It can create websites for various use cases like individual blogs, business websites, and e-commerce solutions. Jamstack works in harmony with a server-based framework by providing full support for static content. We can, however, still use a traditional framework to offer user-generated, server-based content.

Hugo is among the most popular of the current Jamstack frameworks and provides the best build speeds. It helps us enjoy web development without the annoyances of setup, upkeep, or day-to-day maintenance. There is no waiting for compilation, updates, or deployment! Hugo takes a template and a website in markup format and converts that to HTML, so the site is ready to be hosted. I congratulate you for picking up this book and embarking on the journey to radically simplify your approach to web development.