Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,17 @@
Add a [custom domain](/customize/custom-domain) to your deployment from the terminal. Requires authentication with `mint login`.

```bash
mint add-domain <domain>
mint add-domain <domain> [--basePath <path>]
```

| Argument | Description |
| --- | --- |
| `domain` | The custom domain to add, like `docs.example.com`. Must be a bare hostname. |

| Flag | Description |
| --- | --- |
| `--basePath` | Serve your documentation at a [subpath](/customize/custom-domain#choose-where-to-host-your-documentation) on the domain, like `/docs`. Must start with `/` and follow the [base path requirements](/customize/custom-domain#base-path-requirements). |

The command uses your configured subdomain from `mint config`. If you do not have a configured subdomain, it uses the first subdomain on your account.

After registering the domain, the CLI waits up to 10 seconds for DNS records to generate, then prints the `TXT` and `CNAME` records to add at your domain provider:
Expand All @@ -135,12 +139,22 @@
If some `TXT` records are still generating when the command exits, check the [Custom domain setup](https://app.mintlify.com/settings/deployment/custom-domain) page in your dashboard for the remaining values.
</Note>

### Example
When you pass `--basePath`, the CLI saves the base path after registering the domain. The new path takes effect on your next deploy, and your site continues serving from the current path until then. The `CNAME` sends all traffic on the domain to Mintlify, so only add it if the domain hosts nothing else. Otherwise, keep your existing DNS and set up a reverse proxy to Mintlify for the base path. See [Host docs at a subpath](/deploy/docs-subpath) for provider-specific guides.

### Examples

Add a custom domain at the root:

```bash
mint add-domain docs.example.com
```

Add a custom domain and serve your documentation at `/docs`:

```bash
mint add-domain example.com --basePath /docs
```

---

## `mint automations`
Expand Down Expand Up @@ -283,7 +297,7 @@
| `--check-redirects` | Also check that redirect destinations in `docs.json` resolve to valid paths. |
| `--check-snippets` | Also check links inside `<Snippet>` components. |

Pass `--files` to limit the check to specific pages. This is useful for validating a single page you just edited or scoping checks to a directory in CI. When `--files` is set with `--check-external`, only external URLs on the selected pages are fetched.

Check warning on line 300 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L300

In general, use active voice instead of passive voice ('are fetched').

```bash
# Check a specific page
Expand Down Expand Up @@ -463,13 +477,13 @@
mint format
```

Run the command from the root of your docs project. It walks every subdirectory, skipping paths matched by `.gitignore` and any Mintlify ignore rules. Files that already match the canonical output are left untouched.

Check warning on line 480 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L480

In general, use active voice instead of passive voice ('are left').

<Warning>
`mint format` rewrites files in place. Commit or stash your changes before running it so you can review the diff.
</Warning>

When it finishes, the command prints how many MDX files were reformatted and how many failed to parse. If any file fails, the command exits with code `1` and prints the file path and error, so you can run it in CI to enforce consistent formatting.

Check warning on line 486 in cli/commands.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

cli/commands.mdx#L486

In general, use active voice instead of passive voice ('were reformatted').

---

Expand Down
18 changes: 16 additions & 2 deletions es/cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,17 @@ mint status
Añade un [dominio personalizado](/es/customize/custom-domain) a tu implementación desde la terminal. Requiere autenticación con `mint login`.

```bash
mint add-domain <domain>
mint add-domain <domain> [--basePath <path>]
```

| Argumento | Descripción |
| --- | --- |
| `domain` | El dominio personalizado que quieres añadir, como `docs.example.com`. Debe ser un nombre de host simple. |

| Bandera | Descripción |
| --- | --- |
| `--basePath` | Sirve tu documentación en un [subpath](/es/customize/custom-domain#choose-where-to-host-your-documentation) del dominio, como `/docs`. Debe empezar por `/` y cumplir los [requisitos del base path](/es/customize/custom-domain#base-path-requirements). |

El comando usa el subdominio configurado con `mint config`. Si no hay ninguno configurado, usa el primer subdominio de tu cuenta.

Una vez registrado el dominio, la CLI espera hasta 10 segundos a que se generen los registros DNS y luego imprime los registros `TXT` y `CNAME` que debes añadir en tu proveedor de dominio:
Expand All @@ -151,12 +155,22 @@ Añade primero los registros `TXT` y, una vez validados, añade el `CNAME`. Cons
Si algunos registros `TXT` aún se están generando cuando el comando finaliza, revisa la página de [Configuración de dominio personalizado](https://app.mintlify.com/settings/deployment/custom-domain) en tu panel para ver los valores restantes.
</Note>

### Ejemplo
Cuando pasas `--basePath`, la CLI guarda el base path después de registrar el dominio. El nuevo path se aplica en tu próximo despliegue, y tu sitio sigue sirviéndose desde el path actual hasta entonces. El `CNAME` envía todo el tráfico del dominio a Mintlify, así que solo añádelo si el dominio no aloja nada más. En caso contrario, mantén tu DNS actual y configura un reverse proxy a Mintlify para el base path. Consulta [Hospedar la documentación en un subpath](/es/deploy/docs-subpath) para ver guías por proveedor.

### Ejemplos

Añade un dominio personalizado en la raíz:

```bash
mint add-domain docs.example.com
```

Añade un dominio personalizado y sirve tu documentación en `/docs`:

```bash
mint add-domain example.com --basePath /docs
```

---

<div id="mint-automations">
Expand Down
18 changes: 16 additions & 2 deletions fr/cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,17 @@ mint status
Ajoutez un [domaine personnalisé](/fr/customize/custom-domain) à votre déploiement depuis le terminal. Nécessite une authentification avec `mint login`.

```bash
mint add-domain <domain>
mint add-domain <domain> [--basePath <path>]
```

| Argument | Description |
| --- | --- |
| `domain` | Le domaine personnalisé à ajouter, par exemple `docs.example.com`. Doit être un nom d'hôte simple. |

| Option | Description |
| --- | --- |
| `--basePath` | Sert votre documentation sur un [sous-chemin](/fr/customize/custom-domain#choose-where-to-host-your-documentation) du domaine, par exemple `/docs`. Doit commencer par `/` et respecter les [exigences du base path](/fr/customize/custom-domain#base-path-requirements). |

La commande utilise le sous-domaine configuré via `mint config`. Si aucun n'est défini, elle utilise le premier sous-domaine de votre compte.

Une fois le domaine enregistré, la CLI attend jusqu'à 10 secondes que les enregistrements DNS soient générés, puis affiche les enregistrements `TXT` et `CNAME` à ajouter chez votre fournisseur de domaine :
Expand All @@ -151,14 +155,24 @@ Ajoutez d'abord les enregistrements `TXT`, puis ajoutez le `CNAME` une fois les
Si certains enregistrements `TXT` sont encore en cours de génération à la fin de la commande, consultez la page [Configuration du domaine personnalisé](https://app.mintlify.com/settings/deployment/custom-domain) dans votre Dashboard pour récupérer les valeurs restantes.
</Note>

Lorsque vous passez `--basePath`, la CLI enregistre le base path après avoir enregistré le domaine. Le nouveau chemin s'applique lors de votre prochain déploiement, et votre site continue d'être servi depuis le chemin actuel jusque-là. Le `CNAME` envoie tout le trafic du domaine vers Mintlify, donc ne l'ajoutez que si le domaine n'héberge rien d'autre. Sinon, conservez votre DNS actuel et configurez un reverse proxy vers Mintlify pour le base path. Consultez [Héberger la documentation sur un sous-chemin](/fr/deploy/docs-subpath) pour des guides par fournisseur.

<div id="example-add-domain">
### Exemple
### Exemples
</div>

Ajoutez un domaine personnalisé à la racine :

```bash
mint add-domain docs.example.com
```

Ajoutez un domaine personnalisé et servez votre documentation sur `/docs` :

```bash
mint add-domain example.com --basePath /docs
```

---

<div id="mint-automations">
Expand Down
16 changes: 15 additions & 1 deletion zh/cli/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,17 @@ mint status
从终端为你的部署添加一个[自定义域名](/zh/customize/custom-domain)。需要使用 `mint login` 进行身份验证。

```bash
mint add-domain <domain>
mint add-domain <domain> [--basePath <path>]
```

| 参数 | 描述 |
| --- | --- |
| `domain` | 要添加的自定义域名,例如 `docs.example.com`。必须是纯主机名。 |

| 选项 | 描述 |
| --- | --- |
| `--basePath` | 将文档托管在域名的[子路径](/zh/customize/custom-domain#choose-where-to-host-your-documentation)下,例如 `/docs`。必须以 `/` 开头,并符合 [base path 要求](/zh/customize/custom-domain#base-path-requirements)。 |

该命令使用通过 `mint config` 配置的子域名。如果未设置,则使用账户中的第一个子域名。

域名注册后,CLI 将等待最长 10 秒以生成 DNS 记录,然后打印需要在你的域名提供商处添加的 `TXT` 和 `CNAME` 记录:
Expand All @@ -151,14 +155,24 @@ CNAME @ → cname.mintlify.builders
如果命令结束时某些 `TXT` 记录仍在生成中,请稍后前往控制台的 [Custom domain setup](https://app.mintlify.com/settings/deployment/custom-domain) 页面查看剩余的值。
</Note>

传入 `--basePath` 时,CLI 会在注册域名后保存 base path。新路径会在你的下次部署时生效,在此之前你的站点会继续从当前路径提供服务。`CNAME` 会把该域名的所有流量都发送到 Mintlify,因此仅在该域名没有托管其他内容时才添加它。否则,请保留现有 DNS,并为该 base path 设置指向 Mintlify 的反向代理。有关按服务商分类的指南,请参见[将文档托管在子路径下](/zh/deploy/docs-subpath)。

<div id="example-add-domain">
### 示例
</div>

在根路径添加自定义域名:

```bash
mint add-domain docs.example.com
```

添加自定义域名并将文档托管在 `/docs`:

```bash
mint add-domain example.com --basePath /docs
```

---

<div id="mint-automations">
Expand Down