add a post and modify the structure of index