This chapter covers:
- Creating product pages for an eCommerce website in Hugo.
- Adding a shopping cart via JavaScript.
- Using APIs to handle payments
After 11 chapters on Hugo and the Jamstack, we have a complete, fast, and modern corporate website that can be used to present any content authored and managed as markdown documents, with our own custom theme, dynamic surveys, a fuzzy search on the client with support for dynamic comments, a contact form, an embedded single page application.
Hugo is applicable in a much wider variety of use cases. A documentation website is fairly static. A portfolio page or a media website needs image manipulation (Hugo Pipes), and the rest of it is all static content. An educational website is all about presenting content. In this chapter, we will be using these learnings to get into another website domain that is suited for the Jamstack - eCommerce. ECommerce has a lot of static pieces like the product pages that need to provide great load performance but also require user-specific shopping cart management, which makes it a nice use case for utilizing the entire the Jamstack.