Publish documents with resources

This is mostly code taken from the publish branch in cnx-archive.