-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Show related posts #1049
base: master
Are you sure you want to change the base?
Show related posts #1049
Conversation
Kudos, SonarCloud Quality Gate passed!
|
It will be awesome to have this merged :) |
👍 from me on this! |
bcd75b6
to
55b2eb4
Compare
@@ -0,0 +1,13 @@ | |||
{{ $related := first 5 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use Hugo's builtin "related posts" feature? https://gohugo.io/content-management/related/
Using it would be a lot more flexible and users would have a larger range of options to decide how relatedness is defined.
What does this PR change? What problem does it solve?
Related posts are optionally displayed at the bottom of
single.html
Enable with
ShowRelatedContent: true
in the config fileWas the change discussed in an issue or in the Discussions before?
Yes, see #762
PR Checklist
What's left to do?
(publishing now to avoid duplicate content from another contributor)