learn
learn copied to clipboard
Intelligent selection for primary link
Currently, on the item page, one of the links is selected RANDOMLY and shown as a primary. This creates inconsistent / sub-optimal behavior. For eg, book pages sometimes show Amazon or GoodReads link as primary, when actually Wikipedia or OpenLibrary pages should be prioritized.
Check the implementation in Item#primary_link
how come this is not a github issue on the OL repository? You have a valid concern. Idk why it's like this - but the OL uses Amazon for its book imports, so that might be why there. The other ones idk why they're there - as you're right - they do look like advertising - and gives the wrong message. I think they do it for partnerships, but I'm not an expert here.
@BrittanyBunk This is an improvement for learnawesome's item pages like this, not OL's. :) LearnAwesome intends to be a good citizen of the Open Web ecosystem so it matters HOW we choose one of the links as primary. The random selection behaviour was a quick and dirty hack which now needs to be fixed.
For ranking/sorting links, would a reasonable approach be the following :
- Links from known "good" sites (whitelist based)
- Links from Youtube/Vimeo
- Links from .edu / .org
- Links from unknown sites
- Links from .com
- Links from known ecommerce sites