adds pagination to blog posts