I've recently been spurred to investigate automatically building and hosting our documentation with discussion on this thread.
The impetus of this was my confusion, and being directed to compile the source code to see up to date documentation.
In an ideal world, I wouldn't have to compile the source code to see the latest up-to-date documentation. I could simply navigate to a URL and browse the docs in a readable and useful format.
The process of building and hosting our documentation should be automatic, and there are services to assist open-source projects with this task.
For example, I have experience with the open-source documentation hosting platform Read the Docs, which uses the Python Documentation Generator Sphinx, and integrating this service with Travis CI which we already use to automate our build and continuous integration process.
Since Sphinx and Read the Docs is built for python, it can readily consume python docstrings to generate documentation.
Sphinx also has a breath extension for generating documentation from Doxygen sources for FreeCAD's C++ code.
I don't necessarily care what services, technologies, or libraries we use.
What I want is:
1. Automatic building and hosting of documentation as part of our continuous integration process
2. Versioned documentation so that I can refer to the latest docs, the latest stable version, or an older version
3. Readable, formatted well, and pretty -- Supports C++ and Python
David_D outlines two solutions in this post:
1. Stick with Doxygen
2. Move to Sphinx
David_D also mentions upsides of moving to Sphinx:
yorik chimed in on this post:David_D wrote:
- Documentation generated quickly and easily. Lowers the bar to entry for those who want to document things.
- Greater flexibility in how the documentation is structured, instead of sticking to doxygen's rather c++ oriented structure. Currently, I find the api doc's structure rather arbitrary. I think we can make it much more user friendly.
- Good looking.
He doesn't seemed married to the idea of using Sphinx, and seems fine with Doxygen. Although, was initially in favor of Sphinx because it's better suited to generating Python documentation.yorik wrote: A note about doxygen/Sphinx, I tried Sphinx some time ago (everything is still there in the /Doc folder) also because I felt doxygen was too ill-suited for python docs... But quickly came to the same shortcomings: For ex. Sphinx is unable to document classes spawn on the fly by C++ code, for example the Document Object. So we ended up setting up dummy objects (in Mod/TemplatePyMod), but it removed all the point of auto doc generation...
And after a while, since Sphinx wasn't able to do much more than doxygen anyway, and its main advantage was a better output/styling, but discovered you could apply css styles to the doxygen output, and therefore do quite a lot of styling there too, I saw lees the point of keeping using Sphinx, and stopped caring about it
My questions are:
1. How does this proposal fit in with our current hosted API docs?
2. Our current hosted API docs are automatically generated. Are they automatically deployed, hosted, and versioned?
3. Are there alternative technologies and services for documentation besides the ones I listed above?
4. If I were to figure out building and hosting our docs with Travis CI, Sphinx, and Read the Docs, then would someone with merge permissions accept these changes?
5. This is an open discussion. What do you feel our current automatically generated documentation lacks? How can it be improved?
vocx mentions on current limitation of our docs in this post:
The following "This is now a thread about documentation" post offers good related discussion on this topic.vocx wrote: Also, remember that https://www.freecadweb.org/api is incomplete. This generated documentation is stripped from many things to make it small (600 MB), so it can be hosted online. The full documentation that can be produced offline from the sources is 4.5 GB in size.
Example Read the Docs Hosted & Sphinx Generated Docs Site for a FreeCAD Python Workbench
https://ose-3d-printer-workbench.readth ... index.html