Skip to content

Add comprehensive docs.json sample setup to settings page #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
235 changes: 235 additions & 0 deletions settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
<ResponseField name="eyebrows" type="&quot;section&quot; | &quot;breadcrumbs&quot;">
The eyebrows style of the content. Defaults to `section`.
</ResponseField>
<ResponseField name="codeblocks" type="&quot;system&quot; | &quot;dark&quot;">

Check warning on line 97 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L97

Did you really mean 'codeblocks'?
The codeblock theme. Defaults to `system`.

Check warning on line 98 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L98

Did you really mean 'codeblock'?
</ResponseField>
</Expandable>
</ResponseField>
Expand All @@ -104,7 +104,7 @@
Icon library settings

<Expandable title="Icons">
<ResponseField name="library" type="&quot;fontawesome&quot; | &quot;lucide&quot;" required>

Check warning on line 107 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L107

Did you really mean 'lucide'?
The icon library to be used. Defaults to `fontawesome`.
</ResponseField>
</Expandable>
Expand All @@ -114,7 +114,7 @@

<Expandable title="Fonts">
<ResponseField name="family" type="string" required>
The font family, such as "Open Sans", "Playfair Display"

Check warning on line 117 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L117

Did you really mean 'Playfair'?
</ResponseField>
<ResponseField name="weight" type="number">
The font weight, such as 400, 700. Precise font weights such as 550 are supported for variable fonts.
Expand All @@ -123,7 +123,7 @@
The font source, such as https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2
</ResponseField>
<ResponseField name="format" type="&quot;woff&quot; | &quot;woff2&quot;">
The font format, can be one of woff, woff2

Check warning on line 126 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L126

Did you really mean 'woff'?
</ResponseField>
<ResponseField name="heading" type="object">

Expand Down Expand Up @@ -214,12 +214,12 @@

### Structure

<ResponseField name="navbar" type="object">

Check warning on line 217 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L217

Did you really mean 'navbar'?
Navbar content and settings

Check warning on line 218 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L218

Did you really mean 'Navbar'?

<Expandable title="Navbar">
<ResponseField name="links" type="array of object">
The links in the navbar

Check warning on line 222 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L222

Did you really mean 'navbar'?

<Expandable title="Links">
<ResponseField name="label" type="string" required>
Expand Down Expand Up @@ -475,7 +475,7 @@

<ResponseField name="contextual" type="object">
<Expandable title="Contextual">
<ResponseField name="options" type="array of &quot;copy&quot; | &quot;view&quot; | &quot;chatgpt&quot; | &quot;claude&quot;" required>

Check warning on line 478 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L478

Did you really mean 'chatgpt'?

Check warning on line 478 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L478

Did you really mean 'claude'?
The options to be displayed in the contextual menu. The first option is the default option.
- `copy`: Copy the current page as markdown to the clipboard
- `view`: View the current page as markdown in a new tab
Expand All @@ -493,12 +493,12 @@

### API Configurations

<ResponseField name="api" type="object">

Check warning on line 496 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L496

Did you really mean 'api'?
API reference configuration and playground settings

<Expandable title="Api">
<ResponseField name="openapi" type="string or array or object">
A string or an array of strings of absolute or relative urls pointing to the OpenAPI file(s)

Check warning on line 501 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L501

Did you really mean 'urls'?

<Expandable title="Openapi">
<ResponseField name="source" type="string">
Expand Down Expand Up @@ -581,11 +581,11 @@

### SEO & Search

<ResponseField name="seo" type="object">

Check warning on line 584 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L584

Did you really mean 'seo'?
SEO indexing configurations

<Expandable title="Seo">
<ResponseField name="metatags" type="object">

Check warning on line 588 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L588

Did you really mean 'metatags'?
Meta tags added to every page. Must be a valid key-value pair. Possible options [here](https://mintlify.com/docs/settings/seo#supported-meta-tags)
</ResponseField>
<ResponseField name="indexing" type="&quot;navigable&quot; | &quot;all&quot;">
Expand Down Expand Up @@ -779,6 +779,241 @@
</ResponseField>


## Example Configuration

Here's an example of a `docs.json` file showcasing various configuration options:

```json
{
"$schema": "https://mintlify.com/docs.json",
"name": "Acme API Documentation",
"description": "Complete API documentation for Acme's developer platform",
"theme": "mint",
"logo": {
"light": "/logo/light.svg",
"dark": "/logo/dark.svg",
"href": "https://acme.com"
},
"favicon": "/favicon.png",
"colors": {
"primary": "#0D9373",
"light": "#07C983",
"dark": "#0D9373"
},
"styling": {
"eyebrows": "breadcrumbs",
"codeblocks": "dark"
},
"icons": {
"library": "lucide"
},
"fonts": {
"family": "Inter",
"weight": 400,
"heading": {
"family": "Inter",
"weight": 600
}
},
"appearance": {
"default": "system",
"strict": false
},
"background": {
"decoration": "gradient",
"color": {
"light": "#f8fafc",
"dark": "#0f172a"
}
},
"navbar": {
"links": [
{
"label": "Blog",
"href": "https://acme.com/blog",
"icon": "newspaper"
},
{
"label": "Community",
"href": "https://discord.gg/acme",
"icon": "users"
}
],
"primary": {
"type": "github",
"href": "https://github.com/acme/api"
}
},
"navigation": {
"global": {
"languages": [
{
"language": "en",
"default": true,
"href": "/"
},
{
"language": "es",
"href": "/es"
}
],
"versions": [
{
"version": "v2.0",
"default": true,
"href": "/"
},
{
"version": "v1.0",
"href": "/v1"
}
]
},
"tabs": [
{
"tab": "Getting Started",
"pages": [
"introduction",
"quickstart",
"authentication"
]
},
{
"tab": "API Reference",
"pages": [
{
"group": "Users",
"pages": [
"api-reference/users/create",
"api-reference/users/get",
"api-reference/users/update",
"api-reference/users/delete"
]
},
{
"group": "Projects",
"pages": [
"api-reference/projects/list",
"api-reference/projects/create",
"api-reference/projects/get"
]
}
]
},
{
"tab": "Guides",
"pages": [
"guides/webhooks",
"guides/rate-limiting",
"guides/error-handling"
]
}
]
},
"footer": {
"socials": {
"x": "https://x.com/acme",
"github": "https://github.com/acme",
"linkedin": "https://linkedin.com/company/acme",

Check warning on line 917 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L917

Did you really mean 'linkedin'?
"discord": "https://discord.gg/acme"
},
"links": [
{
"header": "Product",
"items": [
{
"label": "Features",
"href": "https://acme.com/features"
},
{
"label": "Pricing",
"href": "https://acme.com/pricing"
}
]
},
{
"header": "Resources",
"items": [
{
"label": "Blog",
"href": "https://acme.com/blog"
},
{
"label": "Status",
"href": "https://status.acme.com"
}
]
}
]
},
"banner": {
"content": "🎉 API v2.0 is now live! [View the migration guide →](/migration)",
"dismissible": true
},
"api": {
"openapi": [
"https://api.acme.com/openapi.json",
"/openapi/users.json"
],
"playground": {
"display": "interactive",
"proxy": true
},
"examples": {
"languages": ["javascript", "python", "curl", "go"],
"defaults": "required"
},
"mdx": {
"auth": {
"method": "bearer",
"name": "Authorization"
},
"server": "https://api.acme.com"
}
},
"seo": {
"indexing": "navigable",
"metatags": {
"og:site_name": "Acme API Documentation",
"twitter:site": "@acme"
}
},
"search": {
"prompt": "Search documentation..."
},
"integrations": {
"ga4": {
"measurementId": "G-XXXXXXXXXX"

Check warning on line 986 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L986

Did you really mean 'measurementId'?
},
"intercom": {
"appId": "abcd1234"

Check warning on line 989 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L989

Did you really mean 'appId'?
},
"posthog": {

Check warning on line 991 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L991

Did you really mean 'posthog'?
"apiKey": "phc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

Check warning on line 992 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L992

Did you really mean 'apiKey'?

Check warning on line 992 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L992

Did you really mean 'phc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'?
"apiHost": "https://app.posthog.com"

Check warning on line 993 in settings.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

settings.mdx#L993

Did you really mean 'apiHost'?
}
},
"contextual": {
"options": ["copy", "chatgpt", "claude"]
},
"redirects": [
{
"source": "/old-docs/:path*",
"destination": "/new-docs/:path*",
"permanent": true
}
]
}
```

This example demonstrates:
- **Theme & Branding**: Custom colors, fonts, and logo configuration
- **Navigation**: Multi-tab structure with grouped pages and global options
- **API Integration**: OpenAPI specs, playground settings, and authentication
- **SEO & Analytics**: Search engine optimization and tracking integrations
- **User Experience**: Banners, contextual menus, and footer links
- **Internationalization**: Multi-language and versioning support

## Validation

It is advised to include the following schema reference at the top of your docs.json file to ensure proper validation while editing:
Expand Down