converting chapters index to html