Split html files into required template files