Rewrite for generate docs