From c45067d2b856f124d562f27ece7adf88e1378a36 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2026 22:13:13 +0000 Subject: [PATCH] docs: document mint add-domain --basePath flag --- cli/commands.mdx | 18 ++++++++++++++++-- es/cli/commands.mdx | 18 ++++++++++++++++-- fr/cli/commands.mdx | 18 ++++++++++++++++-- zh/cli/commands.mdx | 16 +++++++++++++++- 4 files changed, 63 insertions(+), 7 deletions(-) diff --git a/cli/commands.mdx b/cli/commands.mdx index 4525297e47..eb29ebefd7 100644 --- a/cli/commands.mdx +++ b/cli/commands.mdx @@ -112,13 +112,17 @@ mint status Add a [custom domain](/customize/custom-domain) to your deployment from the terminal. Requires authentication with `mint login`. ```bash -mint add-domain +mint add-domain [--basePath ] ``` | 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: @@ -135,12 +139,22 @@ Add the `TXT` records first, then add the `CNAME` once the verification records 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. -### 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` diff --git a/es/cli/commands.mdx b/es/cli/commands.mdx index a3d644d762..61bed4d01d 100644 --- a/es/cli/commands.mdx +++ b/es/cli/commands.mdx @@ -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 +mint add-domain [--basePath ] ``` | 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: @@ -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. -### 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 +``` + ---
diff --git a/fr/cli/commands.mdx b/fr/cli/commands.mdx index 215367fed9..665c5110d2 100644 --- a/fr/cli/commands.mdx +++ b/fr/cli/commands.mdx @@ -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 +mint add-domain [--basePath ] ``` | 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 : @@ -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. +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. +
- ### Exemple + ### Exemples
+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 +``` + ---
diff --git a/zh/cli/commands.mdx b/zh/cli/commands.mdx index da8b682719..dbb12d1775 100644 --- a/zh/cli/commands.mdx +++ b/zh/cli/commands.mdx @@ -128,13 +128,17 @@ mint status 从终端为你的部署添加一个[自定义域名](/zh/customize/custom-domain)。需要使用 `mint login` 进行身份验证。 ```bash -mint add-domain +mint add-domain [--basePath ] ``` | 参数 | 描述 | | --- | --- | | `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` 记录: @@ -151,14 +155,24 @@ CNAME @ → cname.mintlify.builders 如果命令结束时某些 `TXT` 记录仍在生成中,请稍后前往控制台的 [Custom domain setup](https://app.mintlify.com/settings/deployment/custom-domain) 页面查看剩余的值。 +传入 `--basePath` 时,CLI 会在注册域名后保存 base path。新路径会在你的下次部署时生效,在此之前你的站点会继续从当前路径提供服务。`CNAME` 会把该域名的所有流量都发送到 Mintlify,因此仅在该域名没有托管其他内容时才添加它。否则,请保留现有 DNS,并为该 base path 设置指向 Mintlify 的反向代理。有关按服务商分类的指南,请参见[将文档托管在子路径下](/zh/deploy/docs-subpath)。 +
### 示例
+在根路径添加自定义域名: + ```bash mint add-domain docs.example.com ``` +添加自定义域名并将文档托管在 `/docs`: + +```bash +mint add-domain example.com --basePath /docs +``` + ---