writes posts to html files