Channels and #Get, Fixing a broken Home

Hey, guys. First off, love the platform. I’ve been able to do so much with it. I couldn’t be happier. The challenge I’m having is trying to produce a home page with both very specific tagged content, AND a neat looking featured post slider.

Right now I’m using the Valkyrie template and it works great. You can see the site here:

https://www.bloodandpulp.com

What you’ll notice is I have that neat featured post slider at the top. Heres’s a subset of the #get it uses to populate:

{{#get "posts" limit="3" filter="featured:true" include="tags,authors" order="published_at desc"}}
<div class="hero-unit">...

As you can see when you look at the site, it works great. Now, the problem comes in when I switch the routes.yaml to create a channel for the homepage. The ideas it to restrict the home page to just the “first episodes” of each story. I do this by using a hidden tag called “hash-firstepisode”.

So, when I redid my routes.yaml, this is what I made it look like:

# filters out few tags from Ghost's homepage
routes:
  /:
    controller: channel
    filter: tag:hash-firstepisode
		
# redefine the collections as I we can't define /: twice
collections:
  /s/:
    permalink: /{slug}/
    template:
      - index

# default values
taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

This worked and I magically got just the 7 posts that are “first episodes” on the main home page, BUT it also nuked the featured list. I went back to double check, ALL first episode posts are also featured posts, so it’s not that.

Here’s what it looks like after the routes.yaml change:

Is there something simple I’m missing? I can’t seem to follow how the channel would affect the #get query, but it clearly does, removing that custom routes.yaml and everything goes back to normal.

So, any I going the right way? Is there a better way to do this? Is it even possible to do this?

Thanks!

Marty