Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom routes.yaml filters ignored #33

Open
brainandbrain opened this issue Dec 8, 2023 · 4 comments
Open

Custom routes.yaml filters ignored #33

brainandbrain opened this issue Dec 8, 2023 · 4 comments

Comments

@brainandbrain
Copy link

brainandbrain commented Dec 8, 2023

After switching to the new Source theme, the filters I've set up in my custom routes.yaml are no longer filtering posts correctly. Others in the forums also seem to have this issue: https://forum.ghost.org/t/the-source-theme-doesnt-show-posts-on-websites-with-custom-routes/41741/15

I have my routes.yaml set up to hide posts with certain tags from my homepage, which with Source no longer has any filtering. I also found that the collection pages I've set up for specific tags are only filtering up to the lazy load. The next set of posts loaded have no filtering.

EDIT: Now that I'm looking more closely, the lazy load on collection pages is loading the whole feed over again, repeating the posts already loaded.

@brainandbrain
Copy link
Author

Narrowed down part of this issue to the feed parameter I was loading on my custom template for those pages, which was set to "index." Changing it to "archive" filtered to the correct posts on collection pages (makes sense).

I've temporarily worked around the main issue (filtering of the home post list) by manually filtering out those tags in post-list.hbs, but I wasn't able to work out why it's ignoring the custom routes.

@brainandbrain brainandbrain reopened this Dec 14, 2023
@cathysarisky
Copy link

The problem seems to be the post-list.hbs makes a {{get}} request, instead of looping over the posts already in the route.

@cowchimp
Copy link

Anyone able to tackle this? I would be happy to offer a "bounty".

@augusto-romero-arango
Copy link

Anyone able to tackle this? I would be happy to offer a "bounty".

In post-list.hbs insted the get sections use foreach.

Look how I solved it.
SincosoftSAS@9f7a54b?diff=split&w=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants