diff --git a/home.css b/home.css new file mode 100644 index 0000000000..5385f170da --- /dev/null +++ b/home.css @@ -0,0 +1,444 @@ +/* ========================================================================== + Docs home page + + Ports the Mintlify landing design system (mintlify/landing → public/design.md) + to the docs introduction page: warm neutral surfaces, hairline rails, 6px + cards, and 4px buttons. Accent colors come from the site theme in docs.json. + + Every rule is scoped to `.mint-home`, so nothing here reaches the rest of the + site. Mintlify loads every `.css` file in the content directory on every page. + ========================================================================== */ + +.mint-home { + /* Surfaces */ + --home-surface: #faf8f5; + --home-surface-hover: #f3f0eb; + --home-border: rgba(0, 0, 0, 0.04); + --home-border-hover: rgba(0, 0, 0, 0.09); + --home-line: #f1f0ee; + + /* Foreground */ + --home-fg: #121715; + --home-fg-secondary: #485450; + --home-fg-tertiary: #717d79; + --home-fg-muted: #969e9b; + + /* Theme colors from docs.json, exposed by Mintlify as RGB channels. */ + --home-brand: rgb(var(--primary)); + + --home-dot: rgba(18, 23, 21, 0.16); + + /* Theme-flipping absolutes, for the solid primary button. */ + --home-invert-bg: #0a0b0f; + --home-invert-fg: #faf8f5; + + --home-ease: cubic-bezier(0.22, 1, 0.36, 1); + + color: var(--home-fg-secondary); +} + +html.dark .mint-home { + --home-surface: rgba(255, 255, 255, 0.03); + --home-surface-hover: rgba(255, 255, 255, 0.06); + --home-border: rgba(255, 255, 255, 0.08); + --home-border-hover: rgba(255, 255, 255, 0.16); + --home-line: #1e1f21; + + --home-fg: #faf8f5; + --home-fg-secondary: #d9d7d4; + --home-fg-tertiary: #cfcdca; + --home-fg-muted: #969e9b; + + --home-brand: rgb(var(--primary-light)); + + --home-dot: rgba(250, 248, 245, 0.16); + + --home-invert-bg: #faf8f5; + --home-invert-fg: #121715; +} + +/* -------------------------------------------------------------------------- + Structure + + Content sits inside a 1088px column framed by vertical hairlines — the + landing site's "rails". The rails only appear once there is margin to spare. + -------------------------------------------------------------------------- */ + +.mint-home-rail { + max-width: 1088px; + margin-inline: auto; +} + +@media (width >= 64rem) { + .mint-home-rail { + border-inline: 1px solid var(--home-line); + } +} + +.mint-home-divider { + border-top: 1px solid var(--home-line); +} + +/* Decorative dot field in the page margins. Two nested masks: the wrapper + fades the field out toward the bottom, the inner layer clears the center so + dots never sit behind the copy. */ +.mint-home-dots-fade { + -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 92%); + mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 92%); +} + +.mint-home-dots { + background-image: radial-gradient(var(--home-dot) 1px, transparent 1.25px); + background-size: 16px 16px; + /* Narrow margins on small screens, so the field never creeps under the copy. */ + -webkit-mask-image: linear-gradient( + to right, + #000 0%, + transparent 14%, + transparent 86%, + #000 100% + ); + mask-image: linear-gradient(to right, #000 0%, transparent 14%, transparent 86%, #000 100%); +} + +@media (width >= 64rem) { + .mint-home-dots { + -webkit-mask-image: linear-gradient( + to right, + #000 0%, + transparent 26%, + transparent 74%, + #000 100% + ); + mask-image: linear-gradient(to right, #000 0%, transparent 26%, transparent 74%, #000 100%); + } +} + +/* -------------------------------------------------------------------------- + Typography + -------------------------------------------------------------------------- */ + +.mint-home-title { + margin: 0; + font-size: 2.25rem; + line-height: 2.375rem; + letter-spacing: -1.2px; + font-weight: 500; + text-wrap: balance; + color: var(--home-fg); +} + +@media (width >= 40rem) { + .mint-home-title { + font-size: 2.75rem; + line-height: 2.875rem; + letter-spacing: -1.6px; + } +} + +@media (width >= 64rem) { + .mint-home-title { + font-size: 3.5rem; + line-height: 3.5rem; + letter-spacing: -2.24px; + } +} + +.mint-home-lede { + margin: 0; + font-size: 1rem; + line-height: 1.5rem; + text-wrap: pretty; + color: var(--home-fg-secondary); +} + +/* Section heading, matching the landing site's section header spec. */ +.mint-home-heading { + margin: 0; + font-size: 1.75rem; + line-height: 2rem; + letter-spacing: -0.72px; + font-weight: 500; + text-wrap: balance; + color: var(--home-fg); +} + +@media (width >= 64rem) { + .mint-home-heading { + font-size: 2.25rem; + line-height: 2.5rem; + } +} + +.mint-home-eyebrow { + margin: 0; + font-size: 0.75rem; + line-height: 1rem; + font-weight: 500; + letter-spacing: 0.24px; + color: var(--home-brand); +} + +/* -------------------------------------------------------------------------- + Cards + -------------------------------------------------------------------------- */ + +/* Cards and buttons are links. Mintlify gives content links a primary-colored + bottom border in dark mode (`.dark .link`), so border rules on these + elements need the extra `.mint-home` to win. */ +.mint-home .mint-home-card { + position: relative; + display: flex; + flex-direction: column; + min-height: 15rem; + padding: 1rem; + border: 1px solid var(--home-border); + border-radius: 6px; + background-color: var(--home-surface); + text-decoration: none; + transition: + background-color 150ms var(--home-ease), + border-color 150ms var(--home-ease); +} + +.mint-home .mint-home-card:hover { + background-color: var(--home-surface-hover); + border-color: var(--home-border-hover); +} + +.mint-home-card-icon { + display: flex; + align-items: center; + justify-content: center; + width: 1.25rem; + height: 1.25rem; + flex-shrink: 0; + color: var(--home-fg-muted); + transition: color 150ms var(--home-ease); +} + +.mint-home-card:hover .mint-home-card-icon { + color: var(--home-brand); +} + +.mint-home-card-title { + margin: 0; + display: flex; + align-items: center; + gap: 0.375rem; + font-size: 1.125rem; + line-height: 1.5rem; + font-weight: 500; + color: var(--home-fg); +} + +.mint-home-card-body { + margin: 0; + font-size: 1rem; + line-height: 1.5rem; + text-wrap: pretty; + color: var(--home-fg-secondary); +} + +/* Cards in a row are equal height and bottom-align their text block, so a + one-line description would ride up and break the title baseline across the + row. Reserving two lines keeps the titles level. */ +@media (width >= 40rem) { + .mint-home-card-body { + min-height: 3rem; + } +} + +/* Trailing arrow that slides out on hover. */ +.mint-home-arrow { + flex-shrink: 0; + transform: translateX(-2px); + opacity: 0; + transition: + transform 150ms var(--home-ease), + opacity 150ms var(--home-ease); +} + +.mint-home-card:hover .mint-home-arrow { + transform: translateX(0); + opacity: 1; +} + +/* -------------------------------------------------------------------------- + Buttons + -------------------------------------------------------------------------- */ + +.mint-home-btn { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.375rem; + padding: 0.5rem 0.75rem; + border: 1px solid transparent; + border-radius: 4px; + font-size: 0.8125rem; + line-height: 1rem; + font-weight: 500; + text-decoration: none; + white-space: nowrap; + cursor: pointer; + transition: + background-color 150ms var(--home-ease), + border-color 150ms var(--home-ease), + opacity 150ms var(--home-ease); +} + +.mint-home-btn:focus-visible { + outline: 2px solid var(--home-brand); + outline-offset: 2px; +} + +.mint-home-btn svg { + width: 1rem; + height: 1rem; + flex-shrink: 0; +} + +.mint-home-btn--primary { + background-color: var(--home-invert-bg); + color: var(--home-invert-fg); +} + +.mint-home-btn--primary:hover { + opacity: 0.88; +} + +.mint-home .mint-home-btn--secondary { + border-color: var(--home-border-hover); + background-color: var(--home-surface); + color: var(--home-fg); +} + +.mint-home .mint-home-btn--secondary:hover { + background-color: var(--home-surface-hover); +} + +/* -------------------------------------------------------------------------- + Setup prompt + + The full agent setup prompt is long, so it lands collapsed to a few lines + behind a fade and expands in place. Copy and Cursor stay reachable in both + states — reading the prompt is optional, running it is the point. + -------------------------------------------------------------------------- */ + +.mint-home-prompt { + width: 100%; + max-width: 40rem; + overflow: hidden; + border: 1px solid var(--home-border-hover); + border-radius: 6px; + background-color: var(--home-surface); + text-align: left; +} + +.mint-home-prompt-head { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 0.75rem; + padding: 0.75rem; +} + +.mint-home-prompt-label { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 0.875rem; + line-height: 1.25rem; + font-weight: 500; + color: var(--home-fg); +} + +.mint-home-prompt-label svg { + flex-shrink: 0; +} + +.mint-home-prompt-actions { + display: flex; + align-items: center; + gap: 0.375rem; +} + +.mint-home-prompt-body { + position: relative; + max-height: 6.5rem; + overflow: hidden; + padding: 0 0.75rem; + border-top: 1px solid var(--home-border); + transition: max-height 250ms var(--home-ease); + /* Fades the last visible line so the clip reads as "there is more". */ + -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); + mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); +} + +.mint-home-prompt[data-expanded] .mint-home-prompt-body { + max-height: 22rem; + overflow-y: auto; + -webkit-mask-image: none; + mask-image: none; +} + +.mint-home-prompt-text { + margin: 0; + padding: 0.75rem 0; + white-space: pre-wrap; + font-size: 0.8125rem; + line-height: 1.375rem; + color: var(--home-fg-secondary); +} + +.mint-home-prompt-toggle { + display: flex; + align-items: center; + justify-content: center; + gap: 0.25rem; + width: 100%; + padding: 0.625rem; + border: 0; + border-top: 1px solid var(--home-border); + background: none; + font-size: 0.8125rem; + line-height: 1rem; + font-weight: 500; + color: var(--home-fg-tertiary); + cursor: pointer; + transition: color 150ms var(--home-ease); +} + +.mint-home-prompt-toggle:hover { + color: var(--home-fg); +} + +.mint-home-prompt-toggle:focus-visible { + outline: 2px solid var(--home-brand); + outline-offset: -2px; +} + +.mint-home-prompt-toggle svg { + width: 1rem; + height: 1rem; + flex-shrink: 0; + transition: transform 250ms var(--home-ease); +} + +.mint-home-prompt[data-expanded] .mint-home-prompt-toggle svg { + transform: rotate(180deg); +} + +@media (prefers-reduced-motion: reduce) { + .mint-home .mint-home-card, + .mint-home-card-icon, + .mint-home-arrow, + .mint-home-btn, + .mint-home-prompt-body, + .mint-home-prompt-toggle, + .mint-home-prompt-toggle svg { + transition: none; + } +} diff --git a/index.mdx b/index.mdx index a1efde0bac..7b24ee89eb 100644 --- a/index.mdx +++ b/index.mdx @@ -6,75 +6,83 @@ keywords: ["overview", "platform", "getting started", "features"] boost: 3 --- +import { SetupPrompt } from "/snippets/setup-prompt.jsx"; + +{/* Styles live in home.css, scoped to `.mint-home`. They port the tokens from + the Mintlify landing design system: warm neutral surfaces, hairline rails, + and 6px cards, using the site's theme colors. */} + {/* vale Mintlify.Semicolons = NO */} -export const HeroCard = ({ filename, title, description, href }) => { +export const HomeCard = ({ icon, title, description, href }) => { return ( - - - -

- {title} -

- {description} +
+ + + +
+

+ {title} + + + +

+

{description}

+
); }; {/* vale Mintlify.Semicolons = YES */} -
-
- Decorative background image. - Decorative background image. -
+
+
+
-
- +
+ +
+
+ - - -
-
+
diff --git a/quickstart.mdx b/quickstart.mdx index c2fdccba37..c8bb902223 100644 --- a/quickstart.mdx +++ b/quickstart.mdx @@ -5,7 +5,7 @@ keywords: ["quickstart", "deploy", "get started", "first steps", "tutorial", "se boost: 3 --- -import SetupAgentPrompt from "/snippets/setup-agent-prompt.mdx"; +import { SetupPrompt } from "/snippets/setup-prompt.jsx"; After you complete this guide, you'll have a live documentation site ready to customize and update. @@ -18,7 +18,7 @@ After you complete this guide, you'll have a live documentation site ready to cu The prompt splits the quickstart into tasks your agent can complete and directs it to ask you for any information it needs while getting everything set up. - + {/* vale Mintlify.OxfordComma = NO */} diff --git a/snippets/setup-agent-prompt.mdx b/snippets/setup-agent-prompt.mdx deleted file mode 100644 index 6f0ab77c77..0000000000 --- a/snippets/setup-agent-prompt.mdx +++ /dev/null @@ -1,25 +0,0 @@ -{/* vale off */} - - -Get my documentation live on a published Mintlify site. You are successfully done when you give me the live URL and confirm it loads. Tell me clearly whenever a step needs my input—do everything else yourself. If this prompt was pasted before (for example, after a restart), continue from where things left off instead of starting over. If you don't have terminal or command execution access, tell me to follow the manual steps at [mintlify.com/start](https://mintlify.com/start) instead. Everything below requires running commands and requires Node.js v20.17.0+ (LTS versions recommended). - -1. Ask for my existing content that will be used for my Mintlify site. This may be a local folder or a repo. Verify the source before building: echo back exactly what you're reading and list its top-level contents so I can confirm it's right. If you can't access something I named (private repos return 404, same as nonexistent), stop and ask. Never substitute a different source. -2. Check whether `mint` is installed with `mint --version`. If it's missing, install it with `npm i -g mint` (or `pnpm add -g mint`). If it's already installed, run `mint update` instead of reinstalling. -3. Run `mint status`. If it already shows an organization, skip to step 7. -4. Needs me: If `mint status` shows I'm not logged in, ask me directly whether I already have a Mintlify account. Don't guess. - - If I have one: run `mint login`. You need me for browser steps and to approve access. - - If I don't: ask me for my first name, last name, company, and email if I haven't given them already—never invent these. Run `mint signup --firstName [firstName] --lastName [lastName] --company [company] --email [email]` as a background task since it blocks until I click a verification link that can take several minutes. -5. Needs me: I'll check my email and click the verification link. That opens a browser tab that automatically finishes the rest of account creation/logging in. I must approve the CLI, then connect a GitHub repository or let Mintlify host one. Tell me clearly this step is mine, then wait for it before continuing. -6. Run `mint status` again to confirm an organization and subdomain now exist. The subdomain isn't provisioned until I select or connect a repository during the step 5 browser flow — so if `mint status` shows my organization but no subdomain yet, that almost always means I haven't finished the repo step, not that anything is broken. Don't treat it as an error or poll blindly: wait until I confirm I've completed onboarding, then re-run `mint status`. Provisioning can still lag a few seconds after that, so retry a few times before concluding something is wrong. -7. Needs me: ask for the URL of the repository connected to my Mintlify project — `mint status` doesn't expose it, so you can't look it up yourself. Clone it once I give it to you. -8. Check what's in that repo. If I connected my own existing docs repo, my content is already there — don't overwrite it. If Mintlify created the repo, it contains starter template content — replace that with my actual docs content from step 1. Only use `mint new [directory]` if I want a different theme or template than what's in the repo — scaffold it locally, then use its output in place of the seeded content. -9. Preview with `mint dev`, which generally starts on `http://localhost:3000` unless that port is in use. It blocks until stopped, so run it as a background task. Verify the preview loads, then stop it before continuing. -10. Commit and push your changes. Mintlify deploys automatically on push. -11. Needs me: If I want a custom domain, run `mint add-domain `. It prints the DNS records I need to add with my domain provider. Tell me the DNS records, since only I can configure them at my registrar. Make it clear that this is a step I must complete. -12. Confirm my site is live: fetch `https://.mintlify.site` (find the subdomain via `mint status`) and confirm it loads. If I added a custom domain in step 11, also fetch that domain and confirm it loads before calling this step done—DNS propagation can lag, so retry a few times before treating a failed fetch as an error. -13. Set yourself up to keep working here: install the [Mintlify skill](https://mintlify.com/docs/ai/skillmd.md) with `npx skills add https://mintlify.com/docs`, then register the [admin MCP server](https://mintlify.com/docs/ai/model-context-protocol.md) at `https://mcp.mintlify.com` for your specific tool. For example, `claude mcp add --transport http mintlify https://mcp.mintlify.com` for Claude Code or fetch https://mintlify.com/docs/ai/mintlify-mcp.md for instructions for Claude, Cursor, Codex, or ChatGPT. Do this step yourself—don't ask me to run these commands. -14. Needs me: the first admin MCP tool call opens a browser window for OAuth login. Approve it there. Most tools don't load newly added MCP servers mid-session — if the Mintlify tools don't show up, tell me to restart you and we'll pick up from here. -15. If any command fails in a way not covered above, stop and tell me the exact error rather than guessing or retrying blindly. If it looks like something's wrong on Mintlify's end rather than in what you're doing, check https://status.mintlify.com or point me to https://mintlify.com/docs/contact-support. - - -{/* vale on */} diff --git a/snippets/setup-prompt.jsx b/snippets/setup-prompt.jsx new file mode 100644 index 0000000000..54ac2a1dbc --- /dev/null +++ b/snippets/setup-prompt.jsx @@ -0,0 +1,84 @@ +// The agent setup prompt and the card that displays it, used on the home page +// and the quickstart. This is the only copy of the prompt. The built-in +// component copies its children's source text, so it can't render a +// variable, and snippets can't import other snippets. The prompt lives inside +// the component because Mintlify only extracts the imported export from a +// snippet, not other module-level constants. + +export const SetupPrompt = () => { + const prompt = `Get my documentation live on a published Mintlify site. You are successfully done when you give me the live URL and confirm it loads. Tell me clearly whenever a step needs my input—do everything else yourself. If this prompt was pasted before (for example, after a restart), continue from where things left off instead of starting over. If you don't have terminal or command execution access, tell me to follow the manual steps at [mintlify.com/start](https://mintlify.com/start) instead. Everything below requires running commands and requires Node.js v20.17.0+ (LTS versions recommended). + +1. Ask for my existing content that will be used for my Mintlify site. This may be a local folder or a repo. Verify the source before building: echo back exactly what you're reading and list its top-level contents so I can confirm it's right. If you can't access something I named (private repos return 404, same as nonexistent), stop and ask. Never substitute a different source. +2. Check whether \`mint\` is installed with \`mint --version\`. If it's missing, install it with \`npm i -g mint\` (or \`pnpm add -g mint\`). If it's already installed, run \`mint update\` instead of reinstalling. +3. Run \`mint status\`. If it already shows an organization, skip to step 7. +4. Needs me: If \`mint status\` shows I'm not logged in, ask me directly whether I already have a Mintlify account. Don't guess. + - If I have one: run \`mint login\`. You need me for browser steps and to approve access. + - If I don't: ask me for my first name, last name, company, and email if I haven't given them already—never invent these. Run \`mint signup --firstName [firstName] --lastName [lastName] --company [company] --email [email]\` as a background task since it blocks until I click a verification link that can take several minutes. +5. Needs me: I'll check my email and click the verification link. That opens a browser tab that automatically finishes the rest of account creation/logging in. I must approve the CLI, then connect a GitHub repository or let Mintlify host one. Tell me clearly this step is mine, then wait for it before continuing. +6. Run \`mint status\` again to confirm an organization and subdomain now exist. The subdomain isn't provisioned until I select or connect a repository during the step 5 browser flow — so if \`mint status\` shows my organization but no subdomain yet, that almost always means I haven't finished the repo step, not that anything is broken. Don't treat it as an error or poll blindly: wait until I confirm I've completed onboarding, then re-run \`mint status\`. Provisioning can still lag a few seconds after that, so retry a few times before concluding something is wrong. +7. Needs me: ask for the URL of the repository connected to my Mintlify project — \`mint status\` doesn't expose it, so you can't look it up yourself. Clone it once I give it to you. +8. Check what's in that repo. If I connected my own existing docs repo, my content is already there — don't overwrite it. If Mintlify created the repo, it contains starter template content — replace that with my actual docs content from step 1. Only use \`mint new [directory]\` if I want a different theme or template than what's in the repo — scaffold it locally, then use its output in place of the seeded content. +9. Preview with \`mint dev\`, which generally starts on \`http://localhost:3000\` unless that port is in use. It blocks until stopped, so run it as a background task. Verify the preview loads, then stop it before continuing. +10. Commit and push your changes. Mintlify deploys automatically on push. +11. Needs me: If I want a custom domain, run \`mint add-domain \`. It prints the DNS records I need to add with my domain provider. Tell me the DNS records, since only I can configure them at my registrar. Make it clear that this is a step I must complete. +12. Confirm my site is live: fetch \`https://.mintlify.site\` (find the subdomain via \`mint status\`) and confirm it loads. If I added a custom domain in step 11, also fetch that domain and confirm it loads before calling this step done—DNS propagation can lag, so retry a few times before treating a failed fetch as an error. +13. Set yourself up to keep working here: install the [Mintlify skill](https://mintlify.com/docs/ai/skillmd.md) with \`npx skills add https://mintlify.com/docs\`, then register the [admin MCP server](https://mintlify.com/docs/ai/model-context-protocol.md) at \`https://mcp.mintlify.com\` for your specific tool. For example, \`claude mcp add --transport http mintlify https://mcp.mintlify.com\` for Claude Code or fetch https://mintlify.com/docs/ai/mintlify-mcp.md for instructions for Claude, Cursor, Codex, or ChatGPT. Do this step yourself—don't ask me to run these commands. +14. Needs me: the first admin MCP tool call opens a browser window for OAuth login. Approve it there. Most tools don't load newly added MCP servers mid-session — if the Mintlify tools don't show up, tell me to restart you and we'll pick up from here. +15. If any command fails in a way not covered above, stop and tell me the exact error rather than guessing or retrying blindly. If it looks like something's wrong on Mintlify's end rather than in what you're doing, check https://status.mintlify.com or point me to https://mintlify.com/docs/contact-support.`; + + const [copied, setCopied] = useState(false); + const [expanded, setExpanded] = useState(false); + + const copy = () => { + navigator.clipboard + .writeText(prompt) + .then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 1600); + }) + .catch(() => { + // Clipboard access can be denied. Expand the prompt so it can be copied by hand. + setExpanded(true); + }); + }; + + return ( +
+
+ + + Set up Mintlify with your agent + + +
+ + + + Open in Cursor + +
+
+ +
+
{prompt}
+
+ + +
+ ); +};