Collection Controllers: The Missing Piece in C SSG
How content/posts.md acts as a controller for the whole collection, bringing hero, pagination, and layout in one file.
What is Collection Controller?
In Jekyll you have _posts. In CAX we have content/posts.md:
---
layout: posts-list.cax
hero:
title: Blog
description: All articles
collection: posts
pagination: 6
---
Welcome text here.
This file is NOT a post. It's the controller:
collection: poststells builder to collectcontent/posts/*.mdherois injected to list templatecontentbody becomes welcome textpaginationsets per_page
One file to rule them all. Clean separation of list vs single.