So after fiddling and experimenting, I kinda figured out the workflow of writing custom docs for your custom module :D
-
Make a new directory doc_classes in the root of your custom module.
-
Add following code to config.py:
def get_doc_classes(): return [ "YourClassName", ]
def get_doc_path(): return "doc_classes"
-
Run command line godot --doctool <godot_build_path>
-
Get generated doc file from godot\doc\classes\YourClassName.xml
-
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)