jekyll-paginate-v2 icon indicating copy to clipboard operation
jekyll-paginate-v2 copied to clipboard

Pagination not working on file inside of _layouts directory

Open samsmithvlg opened this issue 4 years ago • 1 comments

Hi!

I am attempting to use pagination on a layout inside of the "_layouts" folder, but when I run the local server in Terminal, it does not seem to be recognizing the layout as a valid pagination page.

At the top of my layout file "testing-sessions-set.html" I have: pagination: enabled: true collection: testing-sessions

As far as I understand, this means that when I do {% for session in paginator.posts %}, it should be looping through the files in my "_testing-sessions" folder. Right now, inside of the loop it is spitting out nothing.

Am I missing something here? Is pagination on a layout file possible?

Thanks!

samsmithvlg avatar Oct 28 '21 19:10 samsmithvlg

It needs to be specified in the front matter of the markdown or html file that calls the layout.

wookdev avatar Feb 12 '22 23:02 wookdev