add preview option to document
build index
fix index position