Use archive layout attributes in Liquid
masterWhen creating archive layouts, jekyll-archives provides special attributes via the page object to represent information about the specific archive being generated. These attributes allow you to dynamically display titles, dates, and the list of posts associated with the archive.
Available Attributes
| Attribute | Type | Description |
|---|---|---|
page.title | String / nil | Contains the name of the tag or category. Returns nil for date-based archives (year, month, day). |
page.date | Date / nil | A Date object for date-based archives. For year archives, ignore month/day; for month archives, ignore day. Returns nil for tag/category archives. |
page.posts | Array | An array of Post objects matching the archive criteria. |
page.type | String | The type of archive being generated. Values: tag, category, year, month, or day. |
Note: To handle different archive types cleanly, it is recommended to use type-specific layouts.