Rewrite docs generation