-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement reStructuredText generation for online documentation of GDExtensions #10733
Comments
This draft PR may also be interesting to you - it aims to put inline Doxygen comments in godot-cpp itself, so your IDE can help give you documentation: godotengine/godot-cpp#1311 |
I came across the PR as I was researching for this. It would be an excellent addition, though it's orthogonal to what I propose here. |
|
I tested The approach, outlinedI think an easy first step should be to add an option to the script to ignore unresolved references. The best way to use it without cloning the repo may be the way poetry handles their installer: curl -sSL https://raw.githubusercontent.com/godotengine/godot/master/doc/tools/make_rst.py | python3 - -o "doc/classes" -l "en" doc_classes Finally, we'll need to add documentation for how to gdextensions should use the tool, including a section for a minimal sphinx (or similar) setup. I don't think any of this will be a big burden to the existing tooling, so I'll just go forward prepare PRs in the next 1-2 weeks. |
I was able to build the docs into a readthedocs repo, mirroring the one godot uses: https://numdot.readthedocs.io/en/latest/index.html To achieve this:
For anyone coming across here looking to create docs for their own gdextension, feel free to use my implementation as a template: https://github.com/Ivorforce/NumDot/tree/main/docs I will consolidate this information into a wiki page to the gdextension docs page. It would be nice to have a 'simpler' way for adding docs without depending on the full godot docs repo, but for now this is an acceptable workflow. |
As godotengine/godot-docs#9966 is merged, the scope of this proposal will be fulfilled: Generating online documentation from the ingame documentation ( To view the docs entry on the matter, visit the article GDExtension Docs System (the changes should be viewable soon). The outlined workflow could certainly be better, but it could also be a lot worse. Any improvements to it should be separately proposed. |
Describe the project you are working on
A gdextension.
Describe the problem or limitation you are having in your project
GDExtensions cannot currently generate online documentation akin to the godot docs. An online reference is an important alternative to in-editor documentation, especially before installation.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
GDExtensions should be able to generate online-compatible documentation, much like make rst for the godot engine itself.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
godot-cpp has recently acquired the capability to generate ingame docs files (doc_classes xml files), thanks to dsnopek. It should be possible to adapt some more of the godot engine documentation pipeline to generate rst files, that can be adapted by e.g. Sphinx to be hosted on a site.
I will be playing with the tool soon, especially as it tool may already support foreign docs to some capacity. If so, it could be integrated and / or its use documented for gdextensions that want to host documentation online.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Not really, though you could manually set up sphinx, duplicating your documentation.
Is there a reason why this should be core and not an add-on in the asset library?
Docs are an important part of complex libraries, useful to all gdextensions.
The text was updated successfully, but these errors were encountered: