Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLaurence Foley
16,695 PointsAdding other pages with pagination
Pagination is only working on my home page. Is it possible to have other pages using pagination? For example if I wanted to have the home page display a certain amount of posts then under the last post have a link to another page that would have an even bigger list of posts that would use pagination to link older posts.
1 Answer
Javier Daza
8,172 PointsLike this answer stated :
"Pagination in Jekyll only works in an index.html file. If you have other pages in the root of your project folder (say, about.html, poems.html) pagination will NOT work in them.
To have pagination work in another page other than your index.html, create a new folder for that page (say, poems/) and change what would have been "poems.html" to "poems/index.html". After that, your "paginate_path" in _config.yml should be 'paginate_path: "/poems/page:num/"."
Laurence Foley
16,695 PointsLaurence Foley
16,695 PointsThanks Javier :)