Filter newsletters from homepage

Hey folks, I am using the Source theme and trying to keep my newsletters (with tag ‘Newsletter’) from showing up on my homepage and from my blog posts and RSS. I had this working at one point, with Casper, but I can’t for the life of me remember how I got it working with my routes.yaml. I’ve gone through the tutorial, and the posts in the forum, but nothing I’ve tried works.

Any guidance would be appreciated.

1 Like

Okay, I think I have the RSS part figured out just by filtering out the tag from the blog collection and using /blog/rss as the RSS feed.

    permalink: /{slug}/
    template: index
    filter: tag:-[Newsletter]
    permalink: /{slug}/
    template: index
    filter: tag:[Newsletter]

Still trying to work out the homepage, though.

Yes, using the documented methods, the source template doesn’t filter out the tags on the home page. There must be a way.

Source is making #get requests on the homepage, and those requests don’t know about your routing file. The workaround is a pretty easy tweak to the theme files. (Doable for self-hosters and anyone with a plan that allows uploading a theme, which is pretty much everyone except Basic users on Ghost Pro.)

I see. I was under the impression that the filtering tutorial and documentation would work across all Ghost authored themes. It should be noted in the tutorials which themes the suggested techniques apply.

Good point! Paging @RyanF ! In addition to Source, I think Headline is also impacted.

1 Like

Thanks Cathy. I did try tweaking the theme files but couldn’t get the result that I wanted. I went back to using the Ubud theme, which makes it easier to control what appears on the home page.