Keep category content in shared data

By: on Mar 11, 2019

Each category record provides a name, URL and collection name. The listing template selects that collection and renders the same post-card loop, keeping the page structure shared as the content changes.

Change the record, reuse the template

Keep page and post metadata distinct. A category introduction describes a collection, while an article title and description should explain the individual piece of content.

Category landing pages read their SEO title and description from the selected record. Individual posts keep their own front matter, so inheriting a category does not replace the title and description of an article.

Adding a category still needs content and page wiring. Use the matching key in directory data and on the landing page, then build the site to check its listing, sidebar link and post breadcrumbs.