related_posts-jekyll_plugin
related_posts-jekyll_plugin copied to clipboard
Limit related posts by the same category
Hi Lawrence,
Thank you very much for the plugin. Is there any way to limit related posts only by the same category? For example, when I have the same tag for posts in different categories, but I would like to show related post with this tag only within one and the same category.
I haven't got the time to look properly at this but it should just be a case of altering line 21 of related_posts.rb
to reference the category.
Hi Lawrence. Could you please give a code example for this line? I'm quite new to Jekyll and Ruby and I can't figure out how to reference a category in there. I would really appreciate your help.