From b21df79890fa0acd6d2bc4e5ea2083302d9e555b Mon Sep 17 00:00:00 2001 From: Maxime BATISTA Date: Tue, 17 Jan 2023 20:31:31 +0100 Subject: [PATCH] Update 'README.md' --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41dd0ff..56b2f4f 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` file + +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