upgrade index.html to specified template