Book Image

Eleventy By Example

By : Bryan Robinson
Book Image

Eleventy By Example

By: Bryan Robinson

Overview of this book

11ty is the dark horse of the Jamstack world, offering unparalleled flexibility and performance that gives it an edge against other static site generators such as Jekyll and Hugo. With it, developers can leverage the complete Node ecosystem and create blazing-fast, static-first websites that can be deployed from a content delivery network or a simple server. This book will teach you how to set up, customize, and make the most of 11ty in no time. Eleventy by Example helps you uncover everything you need to create your first 11ty website before diving into making more complex sites and extending 11ty’s base functionality with custom short codes, plugins, and content types. Over the course of 5 interactive projects, you’ll learn how to build basic websites, blogs, media sites, and static sites that will respond to user input without the need for a server. With these, you’ll learn basic 11ty skills such as templates, collections, and data use, along with advanced skills such as plugin creation, image manipulation, working with a headless CMS, and the use of the powerful 11ty Serverless plugin. By the end of this book, you’ll be well-equipped to leverage the capabilities of 11ty by implementing best practices and reusable techniques that can be applied across multiple projects, reducing the website launch time.
Table of Contents (13 chapters)

What is 11ty?

11ty is an SSG developed by Zach Leatherman in 2017 with a strong sense of inspiration from Jekyll but built in the then-flourishing JavaScript ecosystem. If you know a little Node.js or JavaScript, you can extend the functionality of 11ty. If you don’t have a strong JavaScript background but can run a few commands in the command line, you can use 11ty.

11ty has a few strong philosophies:

  • Static-first – While there are new features in 11ty that allow it to run at request time, as well as pre-generate HTML, the strongest use of 11ty will be to create a static site first, and then extend into the server rendering only when necessary.
  • Flexible – 11ty doesn’t prescribe one way to create sites. In fact, one of the strongest benefits of 11ty over other SSGs is that it comes bundled with over 10 templating engines that can be used separately or together.
  • Frontend agnostic – 11ty doesn’t force you into a single frontend...