Skip to content

Instantly share code, notes, and snippets.

@willnationsdev
Created December 24, 2017 13:59
Show Gist options
  • Save willnationsdev/af36bf6e8a0d79b31a6a040c9d6e8135 to your computer and use it in GitHub Desktop.
Save willnationsdev/af36bf6e8a0d79b31a6a040c9d6e8135 to your computer and use it in GitHub Desktop.
How to create documentation for a Godot Module

So after fiddling and experimenting, I kinda figured out the workflow of writing custom docs for your custom module :D

  1. Make a new directory doc_classes in the root of your custom module.

  2. Add following code to config.py:

    def get_doc_classes(): return [ "YourClassName", ]

    def get_doc_path(): return "doc_classes"

  3. Run command line godot --doctool <godot_build_path>

  4. Get generated doc file from godot\doc\classes\YourClassName.xml

  5. Copy this file to doc_classes and edit it.

If you build again, the build system will get the doc from doc_classes instead of generating a new one.(edited)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment