formats posts on index and flashes