Can't get posts to display on index after making Collections

Hi everyone!

I using the Penang theme from Aspire on my site. Everything works great out of the box. I updated my routing to create Collections, e.i /recipes /guides /podcast but now the posts won’t show up on my index page. Not sure if I did the routing wrong or it’s something I need to fix on the theme file.

This is what the routes.yaml looks like:

And according to the theme documentation, this is the partials/index-tag-list.hbs that’s responsible for displaying the posts on the index page:

{{#get 'tags' limit='all'}}
<nav class='c-tags-list-wrap' aria-label='Tags menu'>
  <ul class='c-tags-list o-plain-list dragscroll'>
    {{#foreach tags}}
      <li><a href='{{ url }}'>{{ name }}</a></li>


Any thoughts on what the culprit is?

Thanks for your help!

Do you have any posts that aren’t tagged with any of the custom collections you set up?

If I’m understanding your setup, what’s happening is that there aren’t any posts left by the time you get to your default route. For example, once the recipes collection filters out the recipe posts, those won’t show up on the default route–they’ve essentially got a new place to live.

If you do want to have these posts live in two places–on your home page and their special collection pages–then you should look into using channels. Instead of putting these under collections, you would put those special groups under routes. See this doc for more info: Ghost Themes - Dynamic URLs & Routing

It’s also possible something else is going. If so, just let me know. :smile:

I appreciate the help! I fixed the issue using Channels. :raised_hands:

Here’s what I ended up doing:

Thank you again for your help! :pray:

1 Like