You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,9 @@ metalsmith.use(pagination({
72
72
***path** The path to render every page under.
73
73
***filter** A string or function used to filter files in pagination.
74
74
***pageMetadata** The metadata to merge with every page.
75
+
***noPageOne** Set to true to disable rendering of page one, useful in conjunction with first (default: `false`).
76
+
***pageContents** Set the contents of generated pages (default: `new Buffer('')`). Useful for [metalsmith-in-place](https://npmjs.org/package/metalsmith-in-place) (especially with `pageMetadata`).
77
+
***groupBy** Set the grouping algorithm manually (default: paginated by `perPage`). Useful for paginating by other factors, like year published (E.g. `date.getFullYear()`).
75
78
76
79
### Page Metadata
77
80
@@ -82,6 +85,7 @@ The `pageMetadata` option is optional. The object passed as `pageMetadata` is me
82
85
Within the template you specified, you will have access to pagination specific helpers:
83
86
84
87
***pagination.num** The current page number.
88
+
***pagination.name** The page name from `groupBy`. It will be the page number string with the default `groupBy`.
85
89
***pagination.files** All the files for the current page (E.g. an array of `x` articles).
86
90
***pagination.pages** Links to every page in the collection (E.g. used to render pagination numbers).
87
91
***pagination.next** The immediately following page, if it exists.
0 commit comments