This is the last big feature release before 1.0 and production ready. The big addition here is the need for the config file. for now it should be a file in the root of the repo being documented and have the following name `ghapd.config.json`. this file then has the following format
json
{
"sources": [
"discord_ritoman/lol/stats/",
"discord_ritoman/api.py",
],
"title_prefix": "",
"title_suffix": "_api",
"titles": [
{
"source": "discord_ritoman/api.py",
"title": "ritoman"
}
]
}
Lets break this down.
First we define our sources, this is where we will generate documentation from. the first example generates all documentation for the directory `discord_ritoman/lol/stats/` this will be a recursive call so any file in this directory or its sub-directories will be documented. Next we document a single file `discord_ritoman/api.py`. You'll notice both paths are relative to the root of the directory, this is how all paths should be defined.
Next we have the `title_prefix` and `title_suffix`. These are stirngs to be appended to the front and back of each title for each file generated. both of these are also required but can be abstracted out by leaving the string blank (see `title_prefix`).
Finally we have the `titles` option. This is the only optional config here but its children have 2 non optional parameters `source` and `title`. this is how we can map a source file to a specific title for documentation generation. if a source defined in `sources` is not defined here then its path will be used as the title.