0
Fork 0
mirror of https://github.com/penpot/penpot-plugins.git synced 2025-01-06 14:50:21 -05:00

feat(docs): how api docs are generated

This commit is contained in:
Juanfran 2024-07-12 12:27:17 +02:00
parent ff488d487c
commit e047977c69
2 changed files with 31 additions and 0 deletions

2
.gitignore vendored
View file

@ -44,3 +44,5 @@ Thumbs.db
.angular
**/assets/plugin.js
docs/api

29
docs/api-docs.md Normal file
View file

@ -0,0 +1,29 @@
### Plugins API Documentation
This document explains how the API documentation hosted at [Penpot Help - Plugins Technical Guide](https://help.penpot.app/technical-guide/plugins/) is created.
The process is automated using GitHub Actions, specifically the workflow defined in `.github/workflows/api-doc.yml`.
#### Steps to Generate the API Documentation
1. **Create Typedocs**
The first step is to generate the typedocs. This is done using the following command:
```shell
npm run create:api-docs
```
2. **Generate Markdown**
After the typedocs are created, the next step is to generate the markdown file that will be hosted on the [Penpot Help site](https://github.com/penpot/penpot-docs). This is done using the following script:
```shell
npm run .github/scripts/create-doc-md.js
```
This script creates an `api.md` file.
3. **Push to Repository**
Finally, the generated `api.md` file is pushed to the `penpot-docs/technical-guide/plugins` directory in the repository.