- Documentation
- Customize your site
- docs.json reference
docs.json reference
Every key Specly reads from docs.json, with its type and what it does, including the older Mintlify keys.
docs.json sits at the top of your docs folder. Specly reads Mintlify’s format, in its current shape and in the older
keys sites still use, and adds a few keys of its own. It builds what it can and warns about the rest, so a key Specly
doesn’t build yet never stops a build. Only a file that isn’t an object, or a navigation with no page that exists, does.
| Key | Type | Meaning |
|---|---|---|
name |
string | The site’s name. Defaults to “Docs”. |
description |
string | The site in a sentence, shown on the default home page. |
favicon |
string or object | A path, or { "light", "dark" }, where the light one is used. |
logo |
string or object | A path, or { "light", "dark", "href" }. href is where the logo links. |
colors.primary |
hex colour | The accent in light mode. Moved to the nearest colour that passes contrast, with a warning. |
colors.light |
hex colour | The accent in dark mode, moved the same way. |
appearance.default |
system, light or dark |
Where readers start. |
appearance.strict |
boolean | With a light or dark default, fixes the mode and hides the switch. |
banner.content |
string | A line across every page, in inline Markdown. |
banner.dismissible |
boolean | Lets readers close the banner. |
contextual.options |
array of strings | The page menu’s options. See Page menu. |
seo.metatags |
object of strings | Tags added to every page’s head. See SEO. |
A hex colour is six digits, such as #2b3a8c. theme.json wins over colors and appearance where it sets the same
thing. See Theme and fonts.
Navigation
Section titled “Navigation”| Key | Type | Meaning |
|---|---|---|
navigation |
object | Your tabs, groups and pages. See Navigation. |
navigation.tabs[].tab |
string | A tab’s name. |
navigation.tabs[].icon |
string | A Lucide icon for the tab. |
navigation.tabs[].href |
string | Makes a tab with no pages a link. |
navigation.groups[].group |
string | A group’s name. |
navigation.groups[].icon |
string | An icon for the group. |
navigation.groups[].expanded |
boolean | Starts the group open. |
navigation.groups[].pages |
array | Page paths, or nested groups, in order. |
navigation.pages |
array | Pages with no group, in a tab or at the top. |
navigation.anchors[] |
array | { "anchor", "icon", "href" }: a link at the top of the sidebar. With pages or groups, a tab. |
navigation.global.anchors[] |
array | Anchors shown on every version and language. |
navigation.versions[] |
array | { "version", "default" } with its own tabs, groups or pages. |
navigation.languages[] |
array | { "language", "default" } with its own tabs, groups or pages. |
navigation.dropdowns, products, menu |
array | Shown as tabs, with a warning. |
openapi |
string, list or object | A spec on a tab, group or page entry, whose operations become pages: a path or URL, a list of them, or { "source", "directory" }. directory is the folder the pages go in, api-reference by default. |
An entry that holds $ref isn’t read: Specly leaves it out and warns. A page that doesn’t exist is left out and
warned about. If more than one version or language sits inside a tab, only the default builds.
Navbar and footer
Section titled “Navbar and footer”| Key | Type | Meaning |
|---|---|---|
navbar.links[] |
array | { "label", "href" }. A type of github, discord, slack, x or linkedin gives a missing label. |
navbar.primary |
object | The header’s button: { "label", "href" }. |
footer.links[] |
array | Columns: { "header", "items": [{ "label", "href" }] }. title works in place of header. |
footer.socials |
object | Network name to address. |
footer.copyright |
string | A line in the footer. |
See Logo, navbar, footer and banner.
API reference
Section titled “API reference”| Key | Type | Meaning |
|---|---|---|
api.openapi |
string, list or object | The specs for your API pages. |
api.playground.display |
interactive, simple, none or auth |
Whether endpoint pages have Try it. auth is read as simple. |
api.baseUrl |
string or list | The address for samples when a spec lists no servers. |
api.mdx.server |
string or list | Read the same way as api.baseUrl. |
Only http and https addresses count.
Specly’s own keys
Section titled “Specly’s own keys”| Key | Type | Meaning |
|---|---|---|
specly.run |
array | The languages whose code blocks can run. Specly runs JavaScript and Python, and opens TypeScript in StackBlitz or CodeSandbox. |
specly.placeholders |
array of strings | Names that become “Your values”, up to 30, each 1 to 64 characters. |
Older Mintlify keys
Section titled “Older Mintlify keys”Specly reads these so a file written before the current format still builds.
| Key | Type | Read as |
|---|---|---|
topbarLinks |
array | navbar.links, with name for label and url for href. |
topbarCtaButton |
object | navbar.primary. |
footerSocials |
object | footer.socials. |
modeToggle |
object | appearance: default, and isHidden for strict. |
anchors |
array | navigation.anchors, with name for anchor and url for href. |
metadata |
object of strings | seo.metatags. |
api.playground.mode |
show, simple or hide |
api.playground.display: interactive, simple or none. |
tabs |
array | With a navigation that’s a list: { "name", "url" }, where each tab holds the groups whose first page starts with its url. |
$schema, theme |
string | Marks the file as Mintlify’s own. Broken links then only warn. |
What Specly warns about instead of building
Section titled “What Specly warns about instead of building”dropdowns,productsandmenushow as tabs.$refnavigation is left out.- A listed page with no file is left out.
- An OpenAPI operation that no spec has is left out.
- More than one version or language inside a tab builds only the default.
- A colour that fails contrast is moved to a passing one.
- A
specly.runlanguage Specly can’t run, and a placeholder that isn’t a name, are ignored.