This tool was scarcely tested, bugs may happen.
This tool is made for Godot 4
Godot 4 has a neat docs tab where you can see autogenerated pages for scripts you've written. But there are cases when you would want to port documentation to another place, for example to a wiki or an api reference website. This is where this tool can become useful.
- Download the project
- Make sure you have Python 3.11 or later
- Run
pip install jinja2==3.1.2
Run python script from the Godot project directory to generate docs:
py path/to/gdscript_to_md_docs/generate_docs.py
Alternatively you can specify the Godot project directory:
py generate_docs.py -p path/to/godot_project
generate_docs
script has more flags, which you can learn about using:
py generate_docs.py --help
The final markdown is created using a jinja2 template, which can be modified to your liking. See the base file to see which data is passed to a template.
This tool automatically converts some of the BBCode tags, but the list is quite limited. Here are the supported tags:
- [b]
- [i]
- [s]
- [code]
- [codeblock]
- [br]
- [url]
- [img]