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

Replace site.related_posts with Liquid loops for improved relevancy #978

Closed
wants to merge 1 commit into from

Conversation

mmistakes
Copy link
Owner

@mmistakes mmistakes commented Apr 27, 2017

site.related_posts currently outputs an array of the most recent posts for GitHub Pages hosted sites since LSI is disabled, as described in #554.

This PR improves on it with some Liquid code that tries to improve the relevancy of these "related posts" by comparing them with page.tags.

Note: there may be a slight increase in build times as all of the posts need to be looped through, which can obviously slow things down a tad if you have many posts.

@mmistakes mmistakes changed the title Replace site.related_posts with Liquid to display better matches based on tags Replace site.related_posts with Liquid loops for improved relevancy Apr 27, 2017
@mmistakes mmistakes mentioned this pull request May 17, 2017
5 tasks
mmistakes added a commit that referenced this pull request Sep 5, 2017
`site.related_posts` should return an array of latest posts when no related ones are found due to `lsi` being disabled (GitHub Page's doesn't support it).

This works around that bug by showing the 4 latest posts to populate the "You May Also Enjoy" module when enabled with `related: true`.

Fixes #554
Related: #978 #1022
@mmistakes
Copy link
Owner Author

Closed as this negatively impacts build times.

@mmistakes mmistakes closed this Sep 5, 2017
@mmistakes mmistakes deleted the feature/related-posts branch September 5, 2017 17:03
@wonter wonter mentioned this pull request Dec 15, 2017
5 tasks
kkunapuli pushed a commit to kkunapuli/kkunapuli.github.io that referenced this pull request May 30, 2019
`site.related_posts` should return an array of latest posts when no related ones are found due to `lsi` being disabled (GitHub Page's doesn't support it).

This works around that bug by showing the 4 latest posts to populate the "You May Also Enjoy" module when enabled with `related: true`.

Fixes mmistakes#554
Related: mmistakes#978 mmistakes#1022
makaroniame added a commit to makaroniame/makaroniame-old.github.io that referenced this pull request May 18, 2022
`site.related_posts` should return an array of latest posts when no related ones are found due to `lsi` being disabled (GitHub Page's doesn't support it).

This works around that bug by showing the 4 latest posts to populate the "You May Also Enjoy" module when enabled with `related: true`.

Fixes mmistakes#554
Related: mmistakes#978 mmistakes#1022
jchwenger pushed a commit to jchwenger/jchwenger.github.io that referenced this pull request May 5, 2023
`site.related_posts` should return an array of latest posts when no related ones are found due to `lsi` being disabled (GitHub Page's doesn't support it).

This works around that bug by showing the 4 latest posts to populate the "You May Also Enjoy" module when enabled with `related: true`.

Fixes mmistakes#554
Related: mmistakes#978 mmistakes#1022
koyumi0601 pushed a commit to koyumi0601/koyumi0601.github.io that referenced this pull request Jul 31, 2023
Bumps [stylelint](https://github.com/stylelint/stylelint) from 14.12.0 to 14.12.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](stylelint/stylelint@14.12.0...14.12.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant