Skip to main content
  1. X-GOVUK projects
  2. GOV.UK Eleventy Plugin
  3. Layouts


Layout for a paginated list of pages.

View an example page that uses this layout (opens in a new tab)

To use this layout, make collection the value for a page’s layout key.

You will also need to say which pages should be listed, by using the options under the pagination key:

layout: collection
title: Page title
paginationHeading: Posts
  size: 20
  reverse: true

Page introduction content (optional).

In addition to common front matter options, this layout accepts the following options:

Name Type Description
pagination object

Required. Pages to show in the paginated list. Learn more about pagination in the documentation for Eleventy. string

The pages that should be listed, usually a reference to a collection

pagination.size number The number of items to list
pagination.reverse boolean

Set to true to list the items in reverse date order

paginationHeading string Heading for the list of paginated pages.