> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vibestrap.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy docs on Mintlify

> Connect this repository to Mintlify, point docs.your-domain.com at it, ship in under an hour.

This site you're reading right now is on Mintlify. The configuration and the
MDX content both live under the `docs/` directory in the repo: `docs/docs.json`
is the config, `docs/<page>.mdx` is the English content, and `docs/zh/<page>.mdx`
is the Chinese mirror. When you fork Vibestrap, replicating this setup for your
own product is about 30 minutes of clicks plus a DNS propagation wait.

## Prerequisites

* A GitHub repository for your fork of Vibestrap.
* A domain you own (e.g. `your-product.com`) — the docs will live at
  `docs.your-product.com`.
* Access to your DNS provider's dashboard.

## What ships in the repo already

The Vibestrap repo is pre-wired for Mintlify, so you don't have to set this
up from scratch:

* `docs/docs.json` — Mintlify's config file. Defines name, theme, colors,
  navigation, footer, navbar links, and SEO defaults.
* `docs/*.mdx` and `docs/<group>/*.mdx` — 36 English pages organized into
  9 navigation groups.
* `docs/zh/...` — Chinese mirror of every English page.
* `docs/logo/{light,dark}.svg` and `docs/favicon.svg` — placeholder branding
  you should replace with your own.

You'll edit these as you go — don't worry about them yet.

## Step 1: Sign up for Mintlify

1. Go to [mintlify.com/start](https://mintlify.com/start).
2. Sign up with the GitHub account that owns your fork.
3. Pick the **Hobby** plan — it's free and supports custom domains.

## Step 2: Connect your repository

1. In the Mintlify dashboard, click **Connect GitHub**.
2. Install the **Mintlify GitHub App** when prompted. Scope it to just
   your Vibestrap fork (you can add more repos later).
3. Select the repository.

## Step 3: Configure the source

In the Mintlify dashboard go to **Settings → Git settings** and set:

* **Repository**: `<your-org>/vibestrap`
* **Branch**: `main`
* **Subdirectory**: `docs` ← this is the critical one. Mintlify reads
  `docs/docs.json` as the config and treats every page slug as relative to
  that subdirectory.

Save. Mintlify will trigger the first build.

## Step 4: Verify the preview build

1. Watch the **Overview → Deployments** page in the dashboard. The first
   build typically takes 1–2 minutes.
2. When it finishes, click the preview URL — something like
   `your-org.mintlify.app`.
3. Open it. You should see the full Vibestrap docs site with the navigation
   sidebar, language switcher, and search bar.

If the build fails, the dashboard shows a Zod / parsing error pointing at
the file. The most common causes:

* A page listed in `docs/docs.json → navigation` doesn't exist on disk.
* An MDX file uses `<https://example.com>` autolink syntax (Mintlify
  rejects it — use `[example.com](https://example.com)` instead).
* Frontmatter is missing `title` or `description`.

## Step 5: Custom domain

1. In Mintlify dashboard → **Settings → Custom domain**.

2. Enter `docs.your-product.com`.

3. Mintlify shows the DNS record you need to add. It looks like:

   ```
   Type   Host   Value
   CNAME  docs   cname.mintlify-dns.com.
   ```

4. Add that CNAME record at your DNS provider (Cloudflare, Vercel DNS,
   Namecheap, Route53, etc.).

5. Wait. Propagation usually takes 1–24 hours. Mintlify auto-provisions
   an SSL certificate via Let's Encrypt once DNS resolves.

When `docs.your-product.com` resolves, Mintlify will redirect the
`*.mintlify.app` URL to your custom domain.

## Step 6: Update Vibestrap's links

Edit `src/config/site.ts` so the marketing app links to your real docs URL:

```ts theme={null}
links: {
  // ...
  docs: 'https://docs.your-product.com',
}
```

This single change updates the header, footer, refund page, and terms
page — every link to the docs in the marketing site uses
`siteConfig.links.docs`.

Commit and push. Vercel re-deploys the marketing site, and your "Docs"
nav link now opens your branded Mintlify domain.

## Editing flow afterwards

* Every push to `main` that touches `docs/` or `docs/docs.json` triggers a
  Mintlify re-deploy automatically. There's no extra CI step.
* Local preview: `pnpm dlx mintlify dev` from the repo root. The CLI reads
  `docs/docs.json` and serves at `localhost:3000` — same port as `pnpm dev`,
  so don't run both at once.
* Bilingual content: any new page must be created in **both** `docs/<path>.mdx`
  and `docs/zh/<path>.mdx`. Add the slug to **both** language groups in
  `docs/docs.json`. Mintlify won't auto-link them.

## Branding checklist

Replace the placeholder Vibestrap branding with yours:

1. **Logo**: edit `docs/logo/light.svg` and `docs/logo/dark.svg`. Keep the
   220×48 viewBox so the navbar height stays consistent.
2. **Favicon**: replace `docs/favicon.svg`.
3. **Theme color**: edit `docs/docs.json → colors.primary` (hex).
4. **Site name**: edit `docs/docs.json → name`.
5. **Navbar links + primary CTA**: edit `docs/docs.json → navbar`.
6. **Footer**: edit `docs/docs.json → footer.socials` and `footer.links`.
7. **SEO**: edit `docs/docs.json → seo.metatags`.

## Common pitfalls

1. **Wrong source directory**: if the dashboard shows "no pages found",
   double-check the **Source directory** setting is `docs`, not `/` or
   `content/docs`.
2. **Page in `docs/` but not in `docs/docs.json`**: the page renders but is
   orphaned (no sidebar entry, no search hit). Add it to the matching
   language group in `docs/docs.json → navigation.languages`.
3. **Page in `docs/docs.json` but not in `docs/`**: the build fails. Either
   create the file or remove the slug from the navigation.
4. **Custom-domain TLS pending**: after adding the CNAME, Mintlify shows a
   "TLS provisioning" badge for up to 24 hours. If still pending after that,
   re-check the CNAME record matches exactly (no extra dot, no trailing
   slash, target is `cname.mintlify-dns.com.`).
5. **Mixing English and Chinese pages in one group**: Mintlify treats
   `navigation.languages[i].groups` strictly — only put `en/*` pages under
   the `en` language entry, only `zh/*` under the `zh` entry. Cross-language
   links should be plain markdown links, not navigation entries.

## Official docs

* [mintlify.com/docs](https://mintlify.com/docs) — full Mintlify reference
* [docs.json schema reference](https://mintlify.com/docs/organize/settings) — every
  configuration option
* [Navigation](https://mintlify.com/docs/organize/navigation) — group, tab,
  anchor, dropdown, language structures
* [Internationalization](https://mintlify.com/docs/guides/internationalization)
  — multilingual setup
* [Custom domain](https://mintlify.com/docs/customize/custom-domain) — DNS
  records and SSL provisioning
* [Components](https://mintlify.com/docs/components) — built-in MDX
  components (Tabs, Steps, Callouts, Cards, etc.)
