A magical documentation tool for GDScript 2.x.
GDScriptify is an API documentation generator tool for GDScript that converts comments you write alongside the code into Markdown documentation files.
It's great for documenting Godot plugins or frameworks. Even for just small one-script projects.
- Node.js installed on your computer.
npm install gdscriptify -g
gdscriptify [options]
-h, --help
: Show help menu.-d, --directory path
: Path from which to generate the documentation.- It can be an absolute path.
- It can be a relative path (has to start with
./
). - It must contain a
project.godot
file. - Default:
./
.
-o, --ouput path
: Path to store the documentation.- It must be a relative path to
--directory
. - Default:
docs
.
- It must be a relative path to
-c, --code {true|false}
: Generate a "Code Reference" JSON file to--output
.- Default:
false
.
- Default:
-m, --markdown {true|false}
: Generate Markdown files to--output
.- Default:
true
.
- Default:
-r, --readme false
: Prevent generating aREADME
file.- Only has effect when there's 1 GDScript file.
- Default:
true
.
-v, --version
: Show package version.
First of all, you have to document the GDScript files.
Once that's done:
- Open a Terminal.
- Go to your Godot's project folder.
- Run
gdscriptify2
.
cd /path/to/your/godot/project
gdscriptify2
Or, if you don't want to have to go the folder, you can run gdscriptify2
with -d [path]
from anywhere.
gdscriptify2 -d /path/to/your/godot/project
Assuming GDScriptify2's default values are being used, a docs
folder will be created in the root of your Godot's project (where project.godot
or plugin.cfg
is located) with the documentation files.
project
βββ another_awesome_script.gd
βββ awesome_script.gd
βββ docs
β βββ another_awesome_script.md
β βββ awesome_script.md
βββ icon.png
βββ project.godot
If there's only 1 GDScript file in the project, GDScriptify2 will create a README.md
file in the root of your Godot's project.
project
βββ awesome_script.gd
βββ icon.png
βββ project.godot
βββ README.md
Check out the documentation on generating a README file to learn how to make it look better.
If you don't want that one file to be converted into a README file, run:
gdscriptify2 -r false
See CHANGELOG.
- krazyjakee
- hiulit
Feel free to:
- Open an issue if you find a bug.
- Create a pull request if you have a new cool feature to add to the project.
Thanks to:
- hiulit - For creating the original GDScriptify.
- Andrea CalabrΓ³ - For creating the Godot logo.
- Twemoji - For the emojis.
- Source code: MIT License.
- Godot logo: CC BY 3.0.
- Emojis: CC BY 4.0.