rewrite post with markdown and new post javascript