perldotcom
perldotcom copied to clipboard
Add related article links to the bottom of articles
Analytics shows we have a high bounce rate: visitors read an article and leave. To encourage them to read another article we should add a related articles link to the bottom of articles.
It could be as simple as the three latest articles in the same category as the article being read.
I tried coding this in golang template: but when I iterate through the site's page objects, they don't have the categories/category property, so it's impossible to filter for the types of related articles.
Issue #82 provides another way: a set of JSON article data indexed by category could be used to provide a JS widget that provides this info. The other benefit of this is it could be randomized a little, so the same top 3 articles aren't shown on every article of that category.