API Documentation Flow
This section explains the process of generating documentation for Talawa API and updating the Talawa Docs website.
Steps:
-
Clone the
talawa-api
repository into thetalawa-docs
directory.git clone --depth=1 --branch develop https://github.com/PalisadoesFoundation/talawa-api.git
-
Create a new directory inside
talawa-docs
for API documentation.mkdir -p docs/talawa-api-docs
-
Enter the cloned
talawa-api
repository.cd talawa-api
-
Generate documentation using
Typedoc
inside thetalawa-api-docs
directory.npm install --global typedoc
npm install typedoc-plugin-markdown
npx typedoc --entryPoints src --out talawa-api-docs --plugin typedoc-plugin-markdown --entryPointStrategy expand -
Recursively copy the generated documentation to the
docs/talawa-api-docs
folder.cp -r talawa-api/talawa-api-docs/* docs/talawa-api-docs/
-
Clean up the cloned repository and push the updated documentation.
rm -rf talawa-api
git add .
git commit -m "Updated talawa api docs"
git pull --rebase origin develop
git push -u origin develop