How to compile the documentation for the API?

We tried and failed before… but I agree it would be great to have versioning