revamped publish_docs