Building a Blog with Collections
In the first few chapters of this book, we set up a simple website. The pages had similar layouts and needs. To launch that site, we were able to work with just the very core functionality of 11ty and not extend it too much. In this chapter and Chapter 5, we’ll be pushing 11ty further in order to create a blog site.
In this chapter, we’ll set up the basic blog functionality using the concept of collections in 11ty, set up a special template for blog posts, work through date issues, and work with 11ty’s concept of pagination to create a classic, minimal blog site.
We’ll cover the following topics in the chapter:
- What is a collection?
- Creating a collection with directory data and Markdown
- Creating a custom template for blog posts
- Creating a paginated list of blog posts
- Creating dynamic category pages