This website is built using Docusaurus 2, a modern static website generator.
In order to run it, you will need to have Node.js version 16.14 or above.
$ yarn
$ yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
$ yarn build
This command generates static content into the build directory and can be served using any static contents hosting service.
Using SSH:
$ USE_SSH=true yarn deploy
Not using SSH:
$ GIT_USER=<Your GitHub username> yarn deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.
- Create a file in bash in this path
src/snippets/curlaccording to the api changes you made; - Run the following command in the terminal:
$ node src/scripts/generate_code_snippets.mjs
After that, you will see that other files were created in the folders for each language.
We have a script that allows you to translate the docs in other languages. To do this, you need to follow these steps:
- Add your OPEN_AI_API_KEY in the file
src/scripts/translate.mjs; - Run the following command in the terminal:
node translate.js <your_file> 'it,pt,es,fr'This sould do the job. If you have any issues, please contact the team.
Note
The translation is not perfect, so you need to check the translation and make sure that everything is correct.
Caution
The translations preview won't be available in the local development server, so you push the changes to the repository and check the preview build on Netlify.
