Hi there,
I’m trying to use a home.hbs file to do up a custom homepage. I wanted to use pagination and implemented the {{pagination}}
code within the home.hbs page.
I’ve also updated the config details "posts_per_page": 10,
in my package.json
file.
I’m currently using a forked version of the Casper theme, and had also removed the infinite-scroll.js
file from /js/lib. However, though at the bottom of my homepage, it shows up the pagination, the page still displays more than the first 10 posts.
I’ve double-checked that /page/2/, where it pulls from index.hbs, it pulls the right set of post from post-11 onwards.
I’m not too sure where else to edit to ensure that it only loads the first 10 posts within my home.hbs.
- URL: https://therobexperiment.com/ — As this is a public page, I did not compile the incomplete theme zip to post it online
- Ghost v4.1.2
- Node v14.16.0
- macOS Catalina v10.15.7
- Chrome v89.0.4389.114
Hope someone can assist. Thank you!
Code for partial segment for home.hbs
{{!-- The main content area --}}
<div class="post-feed">
{{#foreach posts limit="10"}}
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
{{> "post-card"}}
{{/foreach}}
</div>
{{pagination}}
</div>