build template for posts index