Write and generate documentation.