diff --git a/README.md b/README.md index 2daa496..9d9b8f8 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ steps: This command generates the documentation and deploys it on your CodeDoc space -### arguments +### Arguments - `-l --loc [dir]` location of the documentation sources root - **required** - `-t --type [docusaurus|doxygen|swagger]` type of documentation generator to use. - **required** @@ -22,7 +22,7 @@ This command generates the documentation and deploys it on your CodeDoc space Note ! For swagger and doxygen, you have to pass the configuration file instead of a directory -usage examples : +Usage examples : ``` /entrypoint.sh -l ./documentation/api/api-swagger.yml -t swagger -d api_documentation @@ -30,4 +30,13 @@ usage examples : /entrypoint.sh -l ./src/Doxyfile -t doxygen -d sourcecode_documentation ``` -### How to add custom documentation generator ? +### How to add a custom documentation generator ? + +The `-t ` (`--type `) option lookups for a generator script ``.sh to be present in the `/generators` +(ex: `--type doxygen` searchs for a `/generators/doxygen.sh` file script). +You can add your own generator by simply moving your script into the `/generators` folder + +Furthermore, your generator MUST follow below specifications : +* Define a `generate()` function that will be called, assuming that `$1` equals to the value passed after `-l` (`--loc`) which is the documentation sources location +* Define a `GEN_PATH` variable which is the path of generated outputs +* Place generated outputs in the `GEN_PATH` folder, the caller will then upload generated sources onto the user's CodeDoc space \ No newline at end of file