update index and htmlpreview