The Docs Exporter tab has three sections, the first one will look inside your project and generate a json file with your code reference. The other two will take this json, format it into many markdown pages, creating links between the pages, and also links back to Godot’s official documentation when applicable, organize the files into categories if you’re using them and export them to a destination of your choosing.
For the first one, the json Section, you need to choose which folder or folders of your project you want to scan, then which kind of files you want to filter for, if the scan should be recursive (scan subfolders) or not, and finally, where to save the result.
If you’re using git, the addon folder already has a .gitignore to ignore a reference.json file, so you can save there if you want.
After setting all that, click on “Generate Json Reference” button.
After generating the Json, if you want to export to a GitHub Wiki, just choose to which folder you want to export the markdown files, and press “Export GitHub Wiki Docs Pages”.
I usually include at least a “Home” page in the GitHub wiki besides the code reference, so I use the “Prepend to Sidebar” field to link all the pages in the GitHub wiki that are not auto-generated by the plugin.
Whenever you update your code or your comments, generate the json again and export the documentation again. That’s it!
If you need help with setting up GitHub wiki or cloning it locally take a look at the official documentation
After generating the Json, if you want to export to Hugo, just choose to which folder you want to export the markdown files, and press “Export Hugo Docs Pages” button. For hugo it’s best if you don’t simply export directly into the “content” folder, but rather in a sub-folder in there, like “content/reference” or something of the like.
Also if you’re using categories in your documentation, you can click “Build Categories Db” button before exporting, and all the categories you’re currently using will appear for you to customize their weights and descriptions.
Whenever you update your code or your comments, generate the json again and export the documentation again. That’s it!
Some useful links if you need help setting up a Hugo site: