From fa04b5434e2edd7009c57c7b011058a0e89b488f Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2026 16:08:06 +0000 Subject: [PATCH] docs: sync agent skill with mint dev docs.json generation, search hooks, JSON body toggle --- .../context/skills/mintlify/reference/api-docs.md | 4 ++++ agent-context/context/skills/mintlify/reference/cli.md | 2 +- .../context/skills/mintlify/reference/configuration.md | 2 +- .../mintlify/reference/customization/selectors.md | 10 ++++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/agent-context/context/skills/mintlify/reference/api-docs.md b/agent-context/context/skills/mintlify/reference/api-docs.md index 8d22c29a75..19a2cb4b83 100644 --- a/agent-context/context/skills/mintlify/reference/api-docs.md +++ b/agent-context/context/skills/mintlify/reference/api-docs.md @@ -274,6 +274,10 @@ The playground renders responses automatically based on the `Content-Type` heade When an operation's responses in the OpenAPI spec declare a streaming media type (`text/event-stream`, `application/jsonl`, `application/x-ndjson`, `application/json-seq`, or `multipart/mixed`), the playground streams the response as plain text as it arrives, and readers can click **Stop** to end it. Requests with a `multipart/form-data` body don't stream. +## JSON request bodies + +When an endpoint takes a JSON request body (`application/json` or a `+json` media type), the playground body section has a **Form** and **JSON** toggle. Both views edit the same body, and the request and generated code examples always match it. The JSON view keeps and sends properties that aren't in the OpenAPI schema, and blocks sending until the JSON is valid. The playground remembers the chosen view across endpoints. Other body types, such as `multipart/form-data` or `application/x-www-form-urlencoded`, have no toggle. + ## Parameter anchor links Every parameter in the playground has a clickable anchor link. Hover over a parameter name to reveal the link icon, then click to copy a direct URL to that parameter. The URL format is `your-docs-url/endpoint-path#parameter-name`. For nested parameters, the anchor includes the parent path. diff --git a/agent-context/context/skills/mintlify/reference/cli.md b/agent-context/context/skills/mintlify/reference/cli.md index a6d90ce13e..c1d185eb36 100644 --- a/agent-context/context/skills/mintlify/reference/cli.md +++ b/agent-context/context/skills/mintlify/reference/cli.md @@ -16,7 +16,7 @@ Available on all commands. ## Local development -- `mint dev` — Start local preview at localhost:3000. `--port` sets the port. `--no-open` skips browser launch. `--groups` mocks user groups (space-separated, e.g. `--groups admin user`). `--signed-in` previews as a signed-in reader with no groups; without `--signed-in` or `--groups`, the preview shows the signed-out view. `--disable-openapi` skips OpenAPI processing. `--disable-prefetch` disables navigation prefetching. `--local-schema` allows locally-hosted OpenAPI files over HTTP. The preview generates each page's OG image from local files at `/_mintlify/og/.png` (`index.png` for the home page) and regenerates it on every request. Each page's `og:image` meta tag points to that image unless the page sets a custom `og:image`. +- `mint dev`: Start local preview at localhost:3000. In a directory without `docs.json`, it generates one from the directory structure: root Markdown and MDX files go in an **Introduction** group, each top-level folder becomes a group (nested folders become subgroups, and leading number prefixes such as `01-` are dropped from group names), `index` and `readme` pages sort first, and paths starting with `.` or `_`, `node_modules`, `snippets`, and `.mintignore` entries are skipped. The site name comes from `name` in a `package.json` in the directory or its parent, otherwise the directory name. `--port` sets the port. `--no-open` skips browser launch. `--groups` mocks user groups (space-separated, e.g. `--groups admin user`). `--signed-in` previews as a signed-in reader with no groups; without `--signed-in` or `--groups`, the preview shows the signed-out view. `--disable-openapi` skips OpenAPI processing. `--disable-prefetch` disables navigation prefetching. `--local-schema` allows locally-hosted OpenAPI files over HTTP. The preview generates each page's OG image from local files at `/_mintlify/og/.png` (`index.png` for the home page) and regenerates it on every request. Each page's `og:image` meta tag points to that image unless the page sets a custom `og:image`. - `mint og [page]` — Render a page's social preview (OG) image to a PNG using the `docs.json` `thumbnails` settings and page or section `thumbnail` overrides. `page` defaults to `index`. `--preset` (`classic`, `headline`, `minimal`), `--surface` (`brand`, `neutral`), and `--appearance` (`light`, `dark`) try settings without editing `docs.json`. `--output ` sets the PNG path (default: a temporary file). `--no-open` skips opening the image; it is also skipped when `CI` is set. Warnings (title too long, missing logo, font load failure, low contrast) don't change the exit code. Exits `1` if `docs.json` is invalid or the page doesn't exist. - `mint validate` — Strict build validation; exits non-zero on warnings or errors. `--groups` mocks user groups (space-separated). `--disable-openapi` skips OpenAPI processing. `--local-schema` allows local OpenAPI files. - `mint export`: Export a static site zip for air-gapped deployment. `--output ` sets the output path (default: `export.zip`). `--groups` includes restricted pages (space-separated). `--disable-openapi` skips OpenAPI processing. `--base-path ` serves the export under a subpath such as `/docs` (letters, numbers, hyphens, and underscores, with `/` between segments); without it, the export must be served from the domain root. The export fails if any page path starts with the base path. diff --git a/agent-context/context/skills/mintlify/reference/configuration.md b/agent-context/context/skills/mintlify/reference/configuration.md index 1bd079386b..a7db1f4021 100644 --- a/agent-context/context/skills/mintlify/reference/configuration.md +++ b/agent-context/context/skills/mintlify/reference/configuration.md @@ -598,7 +598,7 @@ JSX components can live in any directory, not just `/snippets/`. Nested imports ### npm packages -To import React components from npm packages, add a `packages` key to `docs.json` (an empty object turns it on), a `package.json` listing every imported package under `dependencies` (including `react` and `react-dom`), and a committed `package-lock.json` or `pnpm-lock.yaml` next to `docs.json`. Deployments with `packages` fail on sites that use authentication or personalization. +To import React components from npm packages, add a `packages` key to `docs.json` (an empty object turns it on), a `package.json` listing every imported package under `dependencies` (including `react` and `react-dom`), and a committed `package-lock.json` or `pnpm-lock.yaml` next to `docs.json`. Deployments with `packages` fail on sites that use authentication or personalization, or that restrict preview deployments with organization authentication or a password. While `packages` is in use, you can't turn on authentication, personalization, or preview access restrictions. ```json "packages": { diff --git a/agent-context/context/skills/mintlify/reference/customization/selectors.md b/agent-context/context/skills/mintlify/reference/customization/selectors.md index 391b05221a..2a92bee26a 100644 --- a/agent-context/context/skills/mintlify/reference/customization/selectors.md +++ b/agent-context/context/skills/mintlify/reference/customization/selectors.md @@ -63,6 +63,16 @@ Use as `[data-component-part=""]` or `[data-component-name=""]`. The `.card-group` is a deprecated alias; author `` for new content. +## Search + +Style the search bar and dialog with `[data-search-item=""]` or `[data-search-item="-"]`. These are documented, stable hooks that persist if internal class names change. Blocks: `trigger` (navbar search bar), `backdrop`, `dialog`, `header` (input area; has `data-disabled` when search is unavailable), `filter-list`, `list` (has `data-loading`), `group` (`data-variant` is `recent`, `results`, or `ask-ai`), `item`, and `footer`. Parts include `trigger-icon`, `trigger-label`, `trigger-hint`, `input`, `header-button`, `filter-trigger`, `filter-content`, `filter-item`, `group-title`, `item-icon`, `item-title`, `item-badge`, `item-breadcrumbs`, and `item-description`. State attributes sit on the named element, for example `[data-search-item="item"][data-highlighted]`: `item[data-highlighted]`, `item-icon[data-variant]` (`page`, `section`, `api-playground`), `item-badge[data-method]` (lowercase HTTP method), `filter-trigger[data-variant]` (`product`, `version`), `filter-trigger[data-open]`, `filter-trigger[data-active]`, and `filter-item[data-selected]`. + +```css +[data-search-item="item"][data-highlighted] [data-search-item="item-title"] { + color: #0D9373; +} +``` + ## Unconfirmed hooks These names appear in public guidance but were not found on current sites. Inspect the DOM before using them: `#header`, `#mobile-nav-content`, `#feedback-thumbs-up`, `#feedback-thumbs-down`, `#localization-select-item`, `.columns`, `.nav-anchor`, `.pagination-title`, `.api-section`, `.api-section-heading`, `.api-section-heading-title`, `.api-section-heading-subtitle`, `.tryit-button`, `.method-pill`.