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

Add featured post by same tags #41

Closed
3 tasks
ajfisher opened this issue Feb 3, 2020 · 1 comment
Closed
3 tasks

Add featured post by same tags #41

ajfisher opened this issue Feb 3, 2020 · 1 comment
Assignees

Comments

@ajfisher
Copy link
Owner

ajfisher commented Feb 3, 2020

To determine the featured post that should appear on the page. Do the following:

  • If not a post then take the most recent
  • Check the current post for tags then iterate over the featured post list and find the post with the highest overlap of tags. Display that one.
  • If a tag page, check for featured post that matches this tag, if can't find then use most recent. If can find then use the same as the header one.
@ajfisher
Copy link
Owner Author

Don't need to do this so much as simply make another graphql query for the featured post that matches the tag.

If featured comes back null then the featured post becomes the top ranked item from the main post list.

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

No branches or pull requests

1 participant