define renderBlog function