add a document to resources.