Filtering a tag from the index using the official Source theme

And

  • How was Ghost installed and configured?
  • What Node version, database, OS & browser are you using?
    • Whatever node/db Ghost.org is using, I’m on a Mac using Chrome
  • What errors or information do you see in the console?
    • None
  • What steps could someone else take to reproduce the issue you’re having?
    • See below:

I’m trying to filter out only posts tagged “blog” on the main home page. I’m using the theme “Source” without any edits. Looking at the docs and forums, it’s shown that updating my routes.yaml file with a filter should be able to hide those posts. Here’s how I’ve edited my routes file:

routes:

collections:
/:
  permalink: /{slug}/
  template: index
  filter: tag:-blog

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

When I view my homepage (located at “/”), I still see the posts tagged “blog”. Shouldn’t they be filtered out?

Here comes the kicker, when I open up the design settings and change the homepage from “Landing” to “Magazine”, the filter works and the blog post is hidden. Same with the “Highlight” option. It seems that ONLY the “Landing” option doesn’t respect the filter.

Anyone have any ideas here? Filtering a tag from the homepage seems like it should be easy (considering other CMSs I’ve tried in the past), but I’ve been banging my head against this for a while now and coming up empty.

What’s the best/correct way to filter a tag and have it not show up on the home page? Thanks!

Source doesn’t respect routes.yaml because it makes get requests. If you can edit the theme, you can add a filter parameter to those requests to get the desired behavior.

In post-list.hbs, I changed the get section for the foreach and worked for me.

https://github.com/SincosoftSAS/Bitakora.GhostSourceTheme/blob/main/partials/components/post-list.hbs