Quick fix for #5304, print metatages on pages.
Code cleanup and add comments.
Fix wrong logic.
Add tests.
Fix missing metatags.
Merge pull request #5350 from openscholar/5325-11

Print metatages on pages.