Add related Articles Component
swilgosz opened this issue · 2 comments
swilgosz commented
Overview
Create component, that lists itmes that are related based on the arguments passed.
ITEMS == Articles (Stray) and the Episodes
Input:
- List of tags.
- Number of items to list.
- article to be excluded
Usually it'll list 3/4 items, but that should be configurable.
Algorithm
- Filter items that contain at least one tag included in the provided list.
- Those that contain more tags from the list should appear first.
- When there are no matching results, show random or recent three articles.
- When there is article being excluded, it should not appear under any conditions. The reason is, that this component will be shown mostly in the sidebar or below the article content, and we don't want to see "Related" articles listing the currently visited one.
adamszwaba commented
When there are no matching results, show random or recent three articles.
Do you think it might be misleading for the reader? If there are no related articles, I would expect there not to be any articles, not some random one. That would have been frustrating.
swilgosz commented
@adamszwaba you are right, but then I would rather just change the widget title. Instead "Related articles", show: "Other interesting posts" when there are no matching results.
Also
- One of the reasons for this feature is to improve internal linking in the project fir engagement and seo.
- This algorithm will serve as a base for further improvements in the future where there will be more content to compare