Install the Mintlify CLI to preview the documentation changes locally. To install, use the following command
npm i mintlify
Run the following command at the root of your documentation (where docs.json is)
npx mintlify dev
Create a PR. Once it is accepted Vercel will deploy the change to https://docs.comfy.org/
Can either use an OpenAPI file or URL containing the file:
cd registry/api-reference # Keep API files separated by products.
npx @mintlify/scraping@latest openapi-file <path-to-openapi-file>
This will only generate the MDX files for each endpoint. You need to add a link to these files in docs.json
, and the up-to-date API spec will be shown on that doc page.
Please just create a PR and we will review it within a few days.
Or talk to us on our discord
The documentation is built with Mintlify, please refer to Mintlify documentation to learn how to use it.
Mintlify uses versioning to add other languages. To add a translation of a page, follow these instructions:
- Create a file under the language code with the same exact filename of the original English filename.
For example: If you are translating introduction.mdx
into Chinese, create a file under zh-CN/get_started/introduction.mdx
.
Specifications for file editing can be found in the Writing Content section of the [Mintlify] (https://mintlify.com/docs/page) document
- Update navigation for
docs.json
Please refer to Mintlify Localization for configuration details.
If you translated a single page, just add the new translated page path to the corresponding language navigation group, and it will be displayed in that language version.
For introduction.mdx
:
"navigation": {
"languages": [
{
"language": "en",
"groups": [
{
"group": "Get Started",
"pages": [
"get_started/introduction",
...
]
},
...
]
},
{
"language": "cn",
"groups": [
{
"group": "开始行动",
"pages": [
"zh-CN/get_started/introduction",
...
]
}
]
}
]
...
}
Mintlify will automatically determine which pages to display in different language versions based on the language
configuration.
Currently, Mintlify supports localization for English (en), Chinese (cn), Spanish (es), French (fr), Japanese (jp), Portuguese (pt), Brazilian Portuguese (pt-BR), and German (de).
For more information, please refer to the Mintlify documentation on Mintlify Localization.
If a language doesn't exist yet, for example, if you want to add a French translation of introduction.mdx
, you should create a new fr-FR
folder in the root directory, complete the translation, and then add the following content under languages
in docs.json
:
{
"languages": [
...
{
"language": "fr",
"groups": [
{
"group": "Get Started",
"pages": [
"fr-FR/get_started/introduction",
...
]
}
]
}
]
}
The locale will translate Mintlify default UI components' text. This is optional. The full list of locales are here.