convert index to markdown