How to adjust number of posts loaded in Edition theme

I’m working on a local copy of Ghost to make a customized version of the Edition theme, which I’ll upload to my live site once it’s ready. My site has a newsletter, which I update weekly, as well as a blog, which gets maybe one post a month. I have the newsletter routed to its own page, which leaves the Edition homepage only loading one post at a time, seemingly loading by month, when you press the “load more” button. I’d like to either get rid of this “load more” feature or at least get it to pull a year’s worth of posts. I’ve searched through the theme files and I haven’t found where the functionality lies. Does anyone know what I need to change?

Can you share what changes you did? Did you change the route setup?

I haven’t made any changes to the route setup, other than the change to route all posts with a certain tag to /newsletter/slug rather than the main site, but that’s just the same thing I did with my live site, which is based on Casper. How Edition manages to determine how many posts to load, I’m still not sure.

Well, any route change can be important, so you should share it to have the full picture.
The posts_per_page is set to 10, so 10 posts should be loaded if you have that many in your main collection (maybe you assigned posts to different collections?).

As you can see on the edition demo page, the posts are from 2020 so there is no time/date limit.

I added this passage to the routes.yaml file, under collections:

  # Newsletter
  /newsletter/:
    permalink: /newsletter/{slug}/
    filter: tag:a-running-commentary
    template: godo-template-grid

The local site I have looks like this, only showing two “latest” posts. I have to click “load more” 3 times to get 1 more post to show, then once for another post, then once for 2 more.


When I go to edition.ghost.io that works a lot better. It might be that it’s hiding the weekly newsletter posts on mine, but not loading in more main blog posts to compensate. Like, it loads ten more posts, but all ten are newsletters, so nothing shows up.

Posts can only belong to one collection, so it’s possible that you simply don’t have more posts that are in the main collection. You can try to create more.

I have the posts. If you go to www.edwardsedition.com, all those posts on the homepage are the ones that should be appearing on the homepage of the local Edition site. They only load one at a time, though, rather than 10 at a time like on edition.ghost.io.

This is the entire routes document:

routes:

collections:
  /:
    permalink: /{slug}/
    filter: tag:-a-running-commentary
    template: index
  /newsletter/:
    permalink: /newsletter/{slug}/
    filter: tag:a-running-commentary
    template: index
taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

I have confirmed this is the same for both the local site and the live site.

Apparently, modifying the routes.yaml file under content>settings in my local Ghost install didn’t make the right changes. I uploaded through the Labs settings and everything is working fine now.