Numbered pages for one alcove, with a pager you write.
paginate: splits the rows of one alcove over numbered pages. The first page is the page that holds the alcove, and page 2 and up are written to path with :n replaced.
The pager markup is yours. A pager file in content/pagers/ lists which parts to show (first, previous, the page numbers, next, last) and the HTML for each, chosen by conditions like tiles.
The live result is a small reading-room bulletin, three entries to a page. The entries are sample data made for this demo.
Live result This page is rendered on request.
Summer reading
Nine of the twelve books are on the shelf. The other three are on holiday.
A feed for the bulletin
These notes are now an RSS feed, written as an XML blueprint.
A guest pass
Visitors can now sign in with a shared guest account and see the members' shelf.
Source the files behind the result above
content/alcoves/demo_bulletin/alcove.yaml
query: |
SELECT slug, published, title, summary
FROM news
ORDER BY published DESC
paginate:
per_page: 3
path: docs/pagination/page/:n
pager: bulletin