# Doccupine > Full documentation for Doccupine. --- # Introduction > Doccupine is a free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command. Source: https://docs.doccupine.com/ # Welcome to Doccupine Doccupine turns a directory of MDX files into a beautiful, production-ready documentation website. Write in standard Markdown, use any of the built-in components, and get a fully themed site with AI-powered search and automatic navigation - all from one command. ```bash npx doccupine ``` That's it. Doccupine prompts you for a source directory, generates your site, and starts a dev server at `http://localhost:3000`. Every edit rebuilds instantly. Want a managed experience instead? The [Doccupine Platform](/platform) gives you a browser-based editor, one-click publishing, custom domains, and team collaboration - no local setup needed. ## How it works You write `.mdx` files using Markdown and built-in components like this one. Doccupine watches your files, generates pages, builds the sidebar from your frontmatter, and handles theming, AI chat, and deployment config for you. Everything on this page - the callout above, the cards below, the code block - is a live example of what your docs can look like out of the box. Rich docs from day one. 14+ components work out of the box - no imports needed. Deploy to the Doccupine Platform or self-host on any platform that supports Next.js. ## Configure your site Doccupine works with no configuration, but when you're ready to customize, everything is controlled through simple JSON files in your project root. - [Global settings](/globals) - Site name, description, favicon, and preview image via `config.json` - [Navigation](/navigation) - Override the auto-generated sidebar with `navigation.json` - [Theme](/theme) - Colors, logos, and dark mode palette via `theme.json` - [Fonts](/fonts) - Google Fonts or local font files via `fonts.json` - [AI Assistant](/ai-assistant) - Enable the built-in chat with your own API key - [MCP Server](/model-context-protocol) - Let AI tools search your docs through `/api/mcp` --- # What is Doccupine > Doccupine is a CLI that turns a directory of MDX files into a complete, production-ready documentation website - no frontend work required. Source: https://docs.doccupine.com/what-is-doccupine # What is Doccupine **Doccupine** is a CLI tool that turns a directory of MDX files into a complete Next.js documentation website. It is less of a framework you assemble and more of a tool that does the assembling for you - you bring the content, Doccupine builds the site. ```bash npx doccupine ``` ## Philosophy Doccupine was built on a simple belief: writing documentation should feel like writing, not like building a web app. Most docs frameworks hand you a pile of libraries and configuration and expect you to wire up rendering, navigation, theming, and search yourself. Doccupine makes those decisions for you and gets out of the way, so the only thing left to do is write. ## Content first You write standard Markdown and MDX. No React, no build configuration, no component wiring. Your navigation, theming, and search are all derived from your files and a handful of JSON config files. If you can write a Markdown file, you can ship a documentation site. ## Batteries included Everything you expect from a great docs site works the moment you run the command - MDX rendering, an auto-generated sidebar, dark and light themes, 14+ built-in components, full-text search, an AI chat assistant, and an MCP server. Nothing to install, nothing to opt into. Every element on this page - this callout, the cards below, the code block above - is a live example of what your docs get out of the box, with zero setup. ## You control the output Doccupine generates a real Next.js 16 app that you can inspect, deploy anywhere, or fork into a separately maintained application. While you continue using Doccupine, its registered output paths remain generator-managed: every fresh run recreates `app` and may rewrite generated components, services, configuration, and manifests. Keep durable customizations in MDX, project-root JSON configuration, and `public`. If you want to modify the generated implementation directly, fork the app or stop regenerating it first. ## Instant feedback Run `npx doccupine` to watch MDX, supported project-root configuration, public assets, and configured OpenAPI sources. Doccupine reconciles edits made during startup and keeps the last successful site when a watch refresh fails. Files such as `theme.json`, `navigation.json`, `sections.json`, `fonts.json`, and `analytics.json` update live. Within `doccupine.json`, the `openapi` field updates live, while `watchDir`, `outputDir`, `port`, and `packageManager` require a restart. ## AI-native Documentation is not only read by people anymore. Doccupine ships a RAG-powered chat assistant so readers can ask questions in natural language, and an MCP server so AI tools and agents can search your documentation directly. Your content is ready for both audiences from day one. ## Opinionated, on purpose Doccupine makes the boring decisions - layout, typography, color, navigation structure - so you can spend your time on the words that matter. When you are ready to customize, simple JSON files let you adjust site metadata, navigation, theme, and fonts without touching a line of code. ## When to use Doccupine Doccupine is built for anyone who needs a polished documentation site without becoming a frontend engineer. - Product and API documentation - Developer guides and tutorials - Internal knowledge bases and runbooks - Design systems and component references There are two ways to run it: `npx doccupine` scaffolds and serves the site on your machine, and you self-host the generated Next.js app anywhere. A managed, browser-based experience with a visual editor, one-click publishing, custom domains, and team collaboration - no local setup. --- # Commands > In this page, you can find all the commands available in Doccupine CLI. Source: https://docs.doccupine.com/commands # Commands In this page, you can find all the commands available in Doccupine CLI. ## Run Doccupine CLI Create a new directory for your project and navigate to it in your terminal. Run the following command to create a new Doccupine project: ```bash npx doccupine ``` Once you run the command, Doccupine will ask you to select a directory to store your MDX files. Choose the directory where you want to create your documentation files. After selecting the directory, Doccupine will ask you to enter the name of the directory for the generated website. Enter the name of the directory where you want to create your website. Finally, Doccupine will ask for an optional path to an OpenAPI document. Leave it blank to skip, or point it at a `.yaml`, `.yml`, or `.json` spec to generate an interactive [API Playground](/api-playground) from your API. This will start the development server on port 3000. Open your browser and navigate to http://localhost:3000 to view your documentation. ## Options | Flag | Description | | -------------------------- | --------------------------------------------------------------------------- | | `--port ` | Port for the dev server (default: `3000`). Auto-increments if taken. | | `--verbose` | Show all Next.js output including compilation details. | | `--reset` | Re-prompt for watch/output directories and the OpenAPI spec path. | | `--skip-install` | Always skip dependency installation before starting the development server. | | `--package-manager ` | Use `pnpm` or `npm` for the generated app instead of auto-detection. | The watch and output directories must not overlap. The output directory must be empty, contain only local metadata such as `.DS_Store` or `.env.local`, or already be owned by Doccupine. This prevents the generator from overwriting another project. If an older `doccupine.json` no longer validates, run `doccupine config --reset`. Generation also reports a validation error, instead of letting one page overwrite another, when two source files resolve to the same route. Starter documentation is created only when the selected source directory contains no MDX files. Existing pages are never replaced just because `index.mdx` is missing. Frontmatter must use the normal YAML `---` delimiter; language-tagged executable frontmatter is rejected. Doccupine marks its output directory with `.doccupine-generated.json` and records generated route, Markdown-mirror, and copied public-file ownership in `.doccupine-artifacts.json`. Treat both files as internal generator state. A fresh run recreates `app`, and later refreshes may rewrite other registered template paths, so keep durable changes in source MDX, project-root JSON files, and `public`. ## Watch mode The default command watches MDX files, supported project-root JSON configuration, `fonts.json`, `analytics.json`, `doccupine.json`, public assets, and configured OpenAPI documents with their discovered local `$ref` files. Changes are processed serially. Once every watcher is ready, Doccupine compares the current sources with the versions used during initial generation and reconciles edits made while startup was still running. ## Route collisions and recovery Two MDX sources cannot generate the same route. For example, `guide.mdx` and `guide/index.mdx` both resolve to `/guide`. A one-time build stops before either source can overwrite the other. During watch mode, a collision keeps the last successfully generated page and site metadata in place. After you move, rename, or delete one of the colliding sources, Doccupine retries the blocked sources and any other MDX changes that could not be applied while the collision existed. A restart or manual resave is not required. Failed watch refreshes keep or restore the last successful pages, route ownership, inferred sections, sitemap, and LLMS/MCP content. A new page with no successful version stays absent until it can be generated safely. ## Reloading doccupine.json Changing the `openapi` field is applied live after the complete candidate reference validates and generates successfully. Invalid JSON, invalid configuration, a missing spec, or a failed generation keeps the current OpenAPI reference and watcher active. Changes to `watchDir`, `outputDir`, `port`, or `packageManager` require restarting Doccupine. ## File-system safety Doccupine does not follow symlinked MDX files or nested directories beneath `watchDir`. Project-root configuration and public assets must also use real files and directories, and the `public` root cannot be a symlink. A stable symlink used as the `watchDir` root is supported, but links inside it are rejected. The output directory must be a real directory, and generated paths cannot contain symlinks. OpenAPI root specs must resolve inside the project, while local references must remain inside the root spec's directory. These checks prevent generated reads, writes, and removals from being redirected elsewhere. ## Dependency installation The first run installs the generated app's dependencies. After that, Doccupine records a fingerprint of the generated `package.json` and the package manager in `.doccupine-install` and reinstalls only when that fingerprint changes or `node_modules` is missing - later runs start the dev server straight away. Pass `--skip-install` to skip the check entirely, for example when you manage dependencies yourself. ## Browsing from another device The dev server is reachable from other devices on your network, but Next.js only serves development resources such as the hot-reload socket to hosts it recognizes. Opened over a LAN IP or a Tailscale/VPN hostname, the page renders but never becomes interactive. To allow additional hostnames, set `ALLOWED_DEV_ORIGINS` in the generated app's `.env` file and restart the dev server. Comma-separate multiple hostnames: ```env ALLOWED_DEV_ORIGINS=my-machine.tailnet-name.ts.net ``` This only affects the development server. Production builds ignore the variable, and leaving it unset keeps Next's DNS-rebinding protection fully enabled. ## Verbose mode ```bash npx doccupine --verbose ``` This will show Next.js output in the terminal, providing detailed logs useful for debugging during development. ## Generate the website ```bash npx doccupine build ``` You can also use the equivalent `npx doccupine generate` command. These commands scaffold the Next.js app from your MDX files without installing dependencies or starting the development server. To produce a production build, install dependencies and run the generated app's `build` script. ## Show current configuration ```bash npx doccupine config --show ``` This will show the current configuration for Doccupine. ## Reset configuration ```bash npx doccupine config --reset ``` This will reset the current configuration for Doccupine. --- # Components > Explore the full library of built-in components available in your documentation pages. Source: https://docs.doccupine.com/components # Components Doccupine includes a rich set of built-in components you can use directly in your MDX files - no imports needed. Browse the full library below. Headings, paragraphs, bold, italic, links, and other text formatting. Ordered lists, unordered lists, and data tables. Inline code, fenced code blocks, and syntax highlighting. Pre-built AI prompts readers can copy or open in Cursor. Highlighted blocks for tips, warnings, and important notes. Collapsible sections for organizing lengthy content. Tabbed interfaces for grouping related content. Numbered step-by-step guides and walkthroughs. File and folder structures with collapsible nodes and keyboard navigation. Visual containers for content, icons, and links. Action components with variants, sizes, and icons. Colored labels for statuses, versions, and metadata. Contextual definitions and explanations shown on hover. Images, videos, and embedded content. Bordered containers with captions for images, videos, and diagrams. Lucide icons you can use anywhere in your docs. Grid layouts for arranging cards and content side by side. Pinned right-rail content that replaces a page's table of contents. Property and parameter documentation blocks. Interactive API reference where readers send real requests and see live responses. Changelog blocks with a subscribable RSS feed. Visual color palette swatches to document your theme colors. Flowcharts, sequence diagrams, and other visualizations from Mermaid syntax. Precise vertical or horizontal gaps, with per-breakpoint control. --- # Headers and Text > Learn how to structure and style your content with headers, formatting, and links. Source: https://docs.doccupine.com/headers-and-text # Headers and Text Learn how to structure and style your content with headers, formatting, and links. ## Headers Headers define the hierarchy of your content and automatically generate navigation anchors. They also appear in the table of contents, helping readers quickly scan through documentation. ### Creating headers Add `#` symbols before text to create headers at various levels: ```text ## Main section header ### Subsection header #### Nested subsection header ``` ## Text Formatting Markdown text styling is supported for emphasis, highlighting, and readability. ### Basic formatting Use these common syntax options: - Bold: `**bold text**` → **bold text** - Italic: `*italic text*` → _italic text_ - Strikethrough: `~~strikethrough~~` → ~~strikethrough~~ ### Combining formats You can mix multiple styles at once for clarity: ```text **_bold and italic_** **~~bold and strikethrough~~** *~~italic and strikethrough~~** ``` ## Superscript and subscript For formulas, notes, or variables, use HTML tags: - Superscript `X2` → X2 - Subscript `H2O` → H2O ## Links Links connect users to internal pages or external resources. Always use descriptive link text for better accessibility. ### Internal links Reference other docs with root-relative paths: ```text [Getting Started](/) [Commands](/commands) ``` - [Getting Started](/) - [Commands](/commands) ### External links Point to external pages by including full URLs: ```text [Markdown Guide](https://www.markdownguide.org/) ``` [Markdown Guide](https://www.markdownguide.org/) ## Blockquotes Blockquotes are used to visually highlight key information, quotations, or examples. ### Single line blockquotes Prefix text with `>` for a single-line blockquote: ```text > Highlighted message or quote ``` > Highlighted message or quote ### Multi-line blockquotes For larger quotes spanning more than one paragraph: ```text > This is a blockquote that spans multiple lines. > It can include several paragraphs of text. > Each new line starts with a `>` symbol. ``` > This is a blockquote that spans multiple lines. > It can include several paragraphs of text. > Each new line starts with a `>` symbol. ## Line Breaks and Spacing Control spacing to improve readability and layout. ### Paragraph breaks Separate paragraphs with blank lines: ```text First paragraph. Second paragraph. ``` First paragraph. Second paragraph. ## Manual line breaks For shorter breaks inside the same paragraph, use `
`: ```text This is one line.
This is the next line. ``` This is one line.
This is the next line. # Best Practices ## Organizing content - Use headers to establish hierarchy - Maintain logical order (avoid skipping levels, e.g., H2 → H4) - Always write meaningful, descriptive headers ## Formatting text - Use **bold** for key emphasis only - Use _italics_ for emphasis or technical terms - Limit formatting combinations to maintain readability ## Links usage - Avoid vague text like “click here” - Prefer root-relative paths for internal links - Regularly validate links to ensure they are not broken --- # Lists and tables > Present structured information using lists or tables. Source: https://docs.doccupine.com/lists-and-tables # Lists and Tables Present structured information using lists or tables. ## Lists Markdown supports both _ordered_ and _unordered_ lists, as well as nested list structures. ### Ordered List Start each item with a number followed by a period to create an ordered list. ```md 1. First item 2. Second item 3. Third item 4. Fourth item ``` 1. First item 2. Second item 3. Third item 4. Fourth item ### Unordered List Use dashes (`-`), asterisks (`*`), or plus signs (`+`) before each item for unordered lists. ```md - First item - Second item - Third item - Fourth item ``` - First item - Second item - Third item - Fourth item ### Nested List Indent items under another to create nested lists. ```md - First item - Second item - Additional item - Additional item - Third item ``` - First item - Second item - Additional item - Additional item - Third item ## Tables Markdown tables use pipes (`|`) to separate columns and hyphens (`---`) to define the header row. Place a pipe at the start and end of each row for better compatibility. ```md | Property | Description | | -------- | -------------------------------------- | | Name | Full name of the user | | Age | Age in years | | Joined | Indicates if user joined the community | ``` | Property | Description | | -------- | -------------------------------------- | | Name | Full name of the user | | Age | Age in years | | Joined | Indicates if user joined the community | --- # Code > Learn how to display inline code and code blocks in documentation. Source: https://docs.doccupine.com/code # Code Learn how to display inline code and code blocks in documentation. ## Adding Code Samples Both inline code snippets and full code blocks are supported. Code blocks offer customization for syntax highlighting and more to improve readability and user experience. ### Inline Code Highlight code within text by wrapping it with backticks: ```text Enclose any `word` or `phrase` in backticks to format it as code. ``` Enclose any `word` or `phrase` in backticks to format it as code. ## Code Blocks To present larger code samples, use triple backticks for fenced code blocks. Each block can be copied, and—if assistant features are enabled—users can request explanations. You may specify the language for highlighting: ````text ```java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ```` ```java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ## Highlighting Diffs Show a visual diff of added or removed lines in your code blocks. Each changed line becomes a full-width row tinted with your theme's success or error color, with a matching accent bar down the edge of the window. Set the language to `diff` and prefix each changed line with `+` or `-`: ````text ```diff function calculateTotal(items) { - return items.reduce((sum, item) => sum + item.price, 0); + const total = items.reduce((sum, item) => sum + item.price, 0); + return Math.round(total * 100) / 100; } ``` ```` ```diff function calculateTotal(items) { - return items.reduce((sum, item) => sum + item.price, 0); + const total = items.reduce((sum, item) => sum + item.price, 0); + return Math.round(total * 100) / 100; } ``` ## File Names Add a `title` to a code block to display a file name in the window bar, styled to match the GitHub-style header. Pass it through the `` component: ```html ``` ## Tabbed Code Blocks Use `` to show several variants of the same snippet - for example the same install command across package managers. Each tab is a keyboard-accessible button, and the copy button copies whichever tab is active. Each tab may set a `language` for highlighting (defaults to `bash`). ```html ``` --- # Prompt > Display re-usable AI prompts that readers can copy or open directly in Cursor. Source: https://docs.doccupine.com/prompt # Prompt Display re-usable AI prompts that readers can copy with one click or open directly in [Cursor](https://www.cursor.com). ## Usage You can use the Prompt component directly within your MDX files without any import. The body supports Markdown, and the copy button copies it as plain text with list items as dashes: ```html You are a security-focused code reviewer. Examine the provided code and report any vulnerabilities. - Flag unsafe input handling and injection risks. - Suggest a safer alternative for every finding. - Rank findings by severity, highest first. ``` You are a security-focused code reviewer. Examine the provided code and report any vulnerabilities. - Flag unsafe input handling and injection risks. - Suggest a safer alternative for every finding. - Rank findings by severity, highest first. ## Actions and icon The `actions` property controls which buttons appear. `copy` copies the prompt to the clipboard, and `cursor` opens it in the Cursor editor through its deeplink (readers need Cursor installed). Add a [Lucide](https://lucide.dev/icons) icon next to the description with `icon`: ```html You are a release-notes assistant. Turn the merged pull requests I paste into a changelog entry. - Group changes under Added, Changed, and Fixed. - Write one plain-language line per change. - Link each line to its pull request number. ``` You are a release-notes assistant. Turn the merged pull requests I paste into a changelog entry. - Group changes under Added, Changed, and Fixed. - Write one plain-language line per change. - Link each line to its pull request number. ## Properties The text displayed in the card header above the prompt. The prompt itself. Rendered as Markdown in the card and converted to plain text for the copy and Cursor actions. Which action buttons to show. Valid values are `"copy"` and `"cursor"`. Defaults to `["copy"]`. A [Lucide](https://lucide.dev/icons) icon name in kebab-case, displayed before the description. --- # Callouts > Make your content stand out by using callouts for extra emphasis. Source: https://docs.doccupine.com/callouts # Callouts Make your content stand out by using callouts for extra emphasis. You can format them as Note, Warning, Info, Danger and Success. ## Callouts Usage You can use the Callouts component directly within your MDX files without any import. The following example shows a basic usage: ```html This is a note callout This is a warning callout This is an info callout This is a danger callout This is a success callout ``` This is a note callout This is a warning callout This is an info callout This is a danger callout This is a success callout ## Properties The type of the callout: `note`, `info`, `warning`, `danger`, or `success`. A custom [Lucide](https://lucide.dev/icons) icon name. Overrides the default icon for the callout type. The content of the callout. --- # Accordion > Interactive panels for toggling visibility of content. Source: https://docs.doccupine.com/accordion # Accordion Interactive panels for toggling visibility of content. Accordion elements help organize information by letting users show or hide sections as needed. They’re an effective way to manage progressive disclosure and simplify navigation through dense or optional content. ## Accordion Usage You can use the Accordion component directly within your MDX files without any import. The following example shows a basic usage: ````html You can put any content in here, including other components, like code: ```java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ```` You can put any content in here, including other components, like code: ```java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ## Open by default Pass `defaultOpen` to have the panel expanded on first render instead of collapsed: ````html This panel starts expanded. ```` This panel starts expanded. ## Properties The title of the accordion. The content of the accordion. Whether the panel is expanded on first render. Defaults to `false`. --- # Tabs > Use the Tabs component to display different content sections in a switchable panel layout. Source: https://docs.doccupine.com/tabs # Tabs Use the Tabs component to display different content sections in a switchable panel layout. Tabs are useful for grouping related information while keeping the interface tidy. You can create as many tabs as needed, and each one can hold other components, text, or code snippets. ## Tabs Usage You can use the Tabs component directly within your MDX files without any import. The following example shows a basic usage: ````html ☝️ This is the content shown only when the first tab is active. Tabs can include all kinds of components. For example, a simple Java program: ```java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ✌️ Content inside this second tab is separate from the first. 💪 This third tab contains its own unique content. ```` ☝️ This is the content shown only when the first tab is active. Tabs can include all kinds of components. For example, a simple Java program: ```java class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` ✌️ Content inside this second tab is separate from the first. 💪 This third tab contains its own unique content. Each tab also accepts an optional `icon` - any [Lucide](https://lucide.dev/icons) icon name - rendered before its title, as shown above. ## Keyboard navigation Tabs use the standard horizontal keyboard pattern. Press **Left Arrow** or **Right Arrow** to move between tabs, and **Home** or **End** to jump to the first or last tab. **Up Arrow** and **Down Arrow** continue to scroll the page and are not captured by the tab list. ## Properties The title of the tab. Optional [Lucide](https://lucide.dev/icons) icon name (kebab-case, e.g. `rocket`) shown next to the tab title. The content of the tabs. --- # Steps > Guide readers step-by-step using the Steps component. Source: https://docs.doccupine.com/steps # Steps Guide readers step-by-step using the Steps component. The Steps component is perfect for organizing procedures or workflows in a clear sequence. Include as many individual steps as necessary to outline your process. ## Steps Usage You can use the `Steps` component to create a step-by-step guide. Each step is represented by a `Step` component, which includes a title and content. ```html Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ``` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ## Properties An optional title for the step. When omitted, the step renders without a title row. A [Lucide](https://lucide.dev/icons) icon name shown next to the step title. The content of the step. --- # Tree > Display hierarchical file and folder structures with collapsible nodes. Source: https://docs.doccupine.com/tree # Tree Display hierarchical structures like file systems, project directories, or nested content. The tree component supports full keyboard navigation and accessibility features. Create trees with either a Markdown list or the `Tree.Folder` and `Tree.File` components. `` and `` are aliases, so either tag works with either syntax. Use the Markdown list syntax for quick, static trees where every folder with content expands by default. Use the component syntax when you need to control open state per folder with `defaultOpen`, mark folders as non-interactive with `openable`, or mix files and folders at arbitrary depth. ## Markdown list syntax Write a nested Markdown list inside `` (or ``) to describe a folder structure. Add a trailing slash to mark a folder, or nest items under it. Folders that contain nested items expand by default. - docs/ - index.mdx - guides/ - configuration.mdx - docs.config.ts ```mdx - docs/ - index.mdx - guides/ - configuration.mdx - docs.config.ts ``` Leave a blank line after the opening tag and before the closing tag so the list parses as Markdown. Names strip inline formatting like `code`, **bold**, or _italic_. ## Basic tree Build trees with the `Tree.Folder` and `Tree.File` components when you want per-folder control. Folders start closed unless you set `defaultOpen`. ```mdx ``` ## Nested folders Create deeply nested structures by nesting `Tree.Folder` components within each other. ```mdx ``` ## Keyboard navigation Click a tree to focus it, then navigate with the keyboard: - **Arrow up/down**: Move through visible items. - **Arrow right**: Expand a closed folder, or move to the first child of an open folder. - **Arrow left**: Collapse an open folder, or move to the parent folder. - **Home**: Jump to the first item in the tree. - **End**: Jump to the last visible item in the tree. - **Enter/Space**: Toggle a folder open or closed. - **Asterisk**: Expand all sibling folders at the current level. - **Type-ahead search**: Type characters to jump to the next item that starts with them. ## Properties ### Tree.Folder The name of the folder displayed in the tree. Whether the folder expands by default. Defaults to `false`. Whether readers can open and close the folder. Set to `false` for a non-interactive folder that stays in its `defaultOpen` state. Defaults to `true`. ### Tree.File The name of the file displayed in the tree. --- # Cards > Cards act as visual containers for your content, giving you flexibility to combine text, icons, images, and links in a clean and organized way. Source: https://docs.doccupine.com/cards # Cards Duplicate a page or section with ease, then emphasize important information or links using customizable layouts and icons. Cards act as visual containers for your content, giving you flexibility to combine text, icons, images, and links in a clean and organized way. ## Cards Usage You can use the Cards component directly within your MDX files without any import. The following example shows a basic usage: ```html Doccupine CLI is a command-line tool that helps you create and manage your Doccupine project. It provides a simple and intuitive interface for creating and configuring your project. ``` Doccupine CLI is a command-line tool that helps you create and manage your Doccupine project. It provides a simple and intuitive interface for creating and configuring your project. ## Link Card Pass a `href` prop to turn the card into a clickable link. The card will display interactive hover and focus styles automatically. ```html Learn how to set up Doccupine and create your first documentation site. ``` Learn how to set up Doccupine and create your first documentation site. ## Properties An optional title for the card. When omitted, the card renders without a title. The [Lucide](https://lucide.dev/icons) icon name to display in the card. A URL or path to link to. When provided, the card becomes a clickable link with interactive styles. The content of the card. --- # Buttons > A flexible action component supporting variants, sizes, icons, and links. Source: https://docs.doccupine.com/buttons # Buttons A flexible action component supporting variants, sizes, icons, and links. Buttons help users initiate actions or navigate to other pages. Use variants to convey emphasis, size for hierarchy, and icons to add clarity. ## Button Usage You can use the Button component directly within your MDX files without any import. The following examples show basic usage: ```html ``` ### Sizes ```html ``` ### Outline ```html ``` ### Full width ```html ``` ### With icon ```html ``` ### As a link Buttons can render as links when you provide an `href`. ```html ``` ## Properties The content of the button. Controls visual emphasis. - **primary** - **secondary** - **tertiary** Controls the size of the button. - **default** - **big** When true, renders the outlined style of the selected variant. When true, the button expands to the full width of its container. Optional icon to display inside the button. - [**Lucide icon**](https://lucide.dev/icons) name or icon node The position of the icon relative to the text. - **left** - **right** When provided, the button renders as a link (``), enabling navigation. --- # Badges > Highlight statuses, version labels, and metadata inline with colored badges. Source: https://docs.doccupine.com/badges # Badges Highlight statuses, version labels, and metadata with small colored badges - inline within text or standing on their own. ## Basic badge You can use the Badge component directly within your MDX files without any import: ```html Badge ``` Badge ## Colors The `color` property selects one of eleven variants to convey different meanings: ```html Badge Badge Badge Badge Badge Badge Badge Badge Badge Badge Badge ``` Badge Badge Badge Badge Badge Badge Badge Badge Badge Badge Badge The `white` and `white-destructive` badges stay literally white in both light and dark mode, which keeps them legible on top of images, colored frames, and hero areas. Their `surface` counterparts follow the active theme instead - white on light pages, dark on dark ones - so reach for those when the badge sits in regular page content. ## Sizes Four sizes match different content hierarchies: ```html Badge Badge Badge Badge ``` Badge Badge Badge Badge ## Shapes Choose between rounded corners and a pill shape: ```html Badge Badge ``` Badge Badge ## Icons Add a [Lucide](https://lucide.dev/icons) icon (kebab-case name) for extra context. Unknown names render nothing, so a typo never breaks the page: ```html Passing Pending Blocked ``` Passing Pending Blocked ## Stroke variant Set `stroke` for an outline instead of a filled background: ```html Badge Badge Badge Badge ``` Badge Badge Badge Badge ## Solid variant Set `solid` for a strong filled background with contrasting text: ```html Badge Badge Badge Badge ``` Badge Badge Badge Badge ## Semantic colors The `info`, `success`, `warning`, and `error` colors come from your theme rather than the fixed palette, so they follow your `theme.json` and the light/dark toggle. They support the same `stroke` and `solid` variations: ```html Badge Badge Badge Badge Badge Badge ``` Badge Badge Badge Badge Badge Badge ## HTTP method badges Set `mono` for a monospace, uppercase label. Combining `mono`, `solid`, and the semantic colors gives the method chips Doccupine itself uses in the sidebar navigation and the API playground: ```html GET POST PUT DELETE ``` GET POST PUT DELETE ## Disabled state Set `disabled` to indicate inactive or unavailable states with reduced opacity: ```html Badge Badge ``` Badge Badge ## Inline usage Badges flow naturally with the surrounding text. For example, this feature requires a Premium subscription, and this endpoint returns JSON. ```html This feature requires a Premium subscription. ``` ## Combined properties All properties compose freely: ```html Pro Verified Beta ``` Pro Verified Beta ## Properties Badge color variant. Defaults to `gray`. Options: `gray`, `blue`, `green`, `yellow`, `orange`, `red`, `purple`, `white`, `surface`, `white-destructive`, `surface-destructive`, plus the theme-driven `info`, `success`, `warning`, and `error`. Badge size. Defaults to `md`. Options: `xs`, `sm`, `md`, `lg`. Badge shape. Defaults to `rounded`. Options: `rounded`, `pill`. A [Lucide](https://lucide.dev/icons) icon name in kebab-case, displayed before the badge text. Display the badge with an outline instead of a filled background. Defaults to `false`. Display the badge with a strong filled background and contrasting text. Takes precedence over `stroke`. Defaults to `false`. Render the label in monospace uppercase, for code-like labels such as HTTP methods. Defaults to `false`. Display the badge in a disabled state with reduced opacity. Defaults to `false`. Additional CSS classes to apply to the badge. The badge label. --- # Tooltips > Show contextual definitions and explanations when readers hover over a term. Source: https://docs.doccupine.com/tooltips # Tooltips Show contextual definitions and explanations when readers hover over terms, abbreviations, or technical concepts. The `Tooltip` component wraps a string of text and reveals a small bubble of additional context on hover or keyboard focus. Tooltips can include an optional headline and a call-to-action link. Tooltips stay inside the viewport: when the wrapped term sits near a screen edge the bubble shifts to fit, and when there is no room above it flips below the term. On touch screens, tap the term to open the tooltip and tap anywhere else to dismiss it. ## Usage You can use the Tooltip component directly within your MDX files without any import: ```html Every API endpoint is documented on its own page. ``` Every API endpoint is documented on its own page. ## Headline and call to action Add a bold headline above the tip text with `headline`, and append a link with `cta` and `href`. Internal links open in the same tab; external links open in a new one. ```html Try the interactive playground to explore your endpoints. ``` Try the interactive playground to explore your endpoints. ## Properties The text displayed in the tooltip. Bold text displayed above the tip text. The call-to-action text for a link inside the tooltip. URL for the call-to-action link. Required when using `cta`. The text that triggers the tooltip on hover or focus. --- # Images and embeds > Enrich your documentation with visuals, videos, and interactive embeds. Source: https://docs.doccupine.com/images-and-embeds # Images and embeds Enrich your documentation with visuals, videos, and interactive embeds. Display images, embed video content, or add interactive frames via iframes to supplement your docs. ![Demo Image](https://docs.doccupine.com/demo.png) ## Images Images enhance documentation with context, illustration, or decorative visual cues. ### Basic Image Syntax Include an image in Markdown using the syntax below: ```md ![Alt text](https://docs.doccupine.com/demo.png) ``` Use clear, descriptive alt text for accessibility and better SEO. Alt text should describe the image’s appearance or content. ### HTML image embeds Embed images in your Markdown content using HTML syntax. ```md Alt text ``` ### Theme-aware images Show different images depending on whether the user is in light or dark mode. Add the `light-only` or `dark-only` className to display an image exclusively in that theme. ```md Diagram Diagram ``` This image is only visible in light mode This image is only visible in dark mode The `light-only` and `dark-only` classes work on any element, not just images. You can use them on videos, iframes, or wrapper divs too. ## Videos Videos add a dynamic element to your documentation, engaging your audience and providing a more immersive experience. ### YouTube Embed To embed a YouTube video, use the following syntax: ```html ``` ### Self-hosted videos Serve up your own video content using the `