n64blog / n64blog.github.io

Blog dedicated to everything N64
http://www.n64blog.com
0 stars 1 forks source link

Changed handling of related posts on gamepage. #44

Closed guypursey closed 7 years ago

guypursey commented 7 years ago

Behaviour has only changed minimally: if there are no related posts then the horizontal rule and the header "Related posts" should now no longer show on any given gamepage.

However, in the background, the way related posts are handled is different -- all related posts are now added to an array, so that the looping and checking of tags against posts now only need happen once, but the information about all the related posts can be used multiple times without extra cost.

This is what has enabled the hiding of the header.

guypursey commented 7 years ago

This relates to issue #35. Can be tested locally by looking at the gamepages /games/007-the-world-is-not-enough.html and games/star-wars-shadows-of-the-empire.html. There may be other edge cases you want to test.