docs.json

Use when you need types, defaults, or valid values for any docs.json key.

Site configuration lives in docs.json or docs.yaml at the repository root. For how each area behaves, see the matching page on Features. Machine-readable schema: /schema.json.

json
{
  "$schema": "https://docs.page/schema.json",
  "name": "My project",
  "description": "Documentation for My project.",
  "sidebar": []
}
FieldSection
name, description, socialPreviewname, description, socialPreview
logo, favicon, banner, themelogo, favicon, banner, theme
header, tabs, sidebar, anchorsheader, tabs, sidebar, anchors
content, seo, variablescontent, seo, variables
redirectsredirects
scripts, search, social, ogscripts, search, social, og
agent, mcpagent, mcp

Schema-only fields

These keys validate in docs.json and appear in /schema.json, but the hosted site does not apply them yet. Setting them has no visible effect until support ships.

FieldValidatesAppliedWorkaround
theme.defaultThemeyesnoReaders use the platform default starting mode; they can still toggle light/dark in the header
header.showThemeToggleyesnoTheme toggle always renders on hosted sites
header.showGitHubCardyesnoGitHub link always renders on hosted sites
header.links[].localeyesnoAll configured links render on every locale

See Theme and Header for behavior that is implemented today.

$schema

$schemastringoptional

Optional JSON Schema URL for editor autocompletion and validation (for example https://docs.page/schema.json). Not read by docs.page at runtime.

name

namestring

Site title used in the header, browser tab, and generated Open Graph images when a page has no frontmatter title.

Falls back to Documentation when omitted.

description

descriptionstring

Default site description for metadata and social previews when a page has no frontmatter description.

socialPreview

socialPreviewstring | false

Static Open Graph image URL applied site-wide. Set to false to disable the default generated image without setting a custom URL.

Per-page frontmatter image overrides this value. See Page frontmatter.

logo

logo.lightstring

Logo URL for light mode. Paths are resolved relative to the repository root.

logo.darkstring

Logo URL for dark mode. When omitted, light mode logo is reused.

favicon

faviconstring | object

Favicon URL or mode-specific URLs.

json
"favicon": "/docs/favicon.png"
json
"favicon": {
  "light": "/docs/favicon-light.png",
  "dark": "/docs/favicon-dark.png"
}

A string sets the same icon for both modes.

banner

banner.messagestring

Announcement text shown in the site-wide banner strip.

banner.hrefstring

Optional link target when the banner is clicked.

banner.backgroundColorstring

Banner background color.

banner.foregroundColorstring

Banner text color.

theme

header

tabs

Top-level navigation tabs. Each tab scopes sidebar groups with a matching tab id.

tabs[].idstringrequired

Tab identifier referenced by sidebar tab fields.

tabs[].titlestringrequired

Label shown in the tab bar.

tabs[].hrefstringrequired

Root-relative path opened when the tab is selected, usually the first page in that tab's sidebar.

tabs[].localestringoptional

When set, show this tab only for the matching locale sidebar.

See Tabs.

sidebar

Navigation tree for the site. Two shapes are supported:

Flat (single locale): array of group objects:

json
"sidebar": [
  {
    "group": "Getting Started",
    "pages": [{ "title": "Introduction", "href": "/" }]
  }
]

Locale-keyed: object with locale codes as keys (plus optional default):

json
"sidebar": {
  "default": [{ "group": "Guide", "pages": [] }],
  "fr": [{ "group": "Guide", "pages": [] }]
}

See Sidebar and Organize.

anchors

Shortcut links rendered below the sidebar search box.

anchors[].iconstringrequired

Font Awesome icon slug.

anchors[].titlestringrequired

Link label.

anchors[].hrefstringrequired

Root-relative path or external URL.

anchors[].localestringoptional

Show this anchor only for the matching locale.

anchors[].tabstringoptional

Show this anchor only when the active tab matches.

See Links.

content

seo

seo.noindexboolean

When true, add noindex to every page on the site. Default: false. Per-page override: frontmatter noindex. See Search engine indexing.

variables

variablesobject

Arbitrary nested object whose string leaf values are substituted into MDX bodies with {{ dotted.path }} syntax during bundling.

json
"variables": {
  "product": "Handbook",
  "api": { "baseUrl": "https://api.example.com" }
}
mdx
The {{ product }} API lives at {{ api.baseUrl }}.

Only string leaf values substitute. Intermediate objects are traversed; non-string leaves leave the placeholder unchanged. Variables do not apply inside frontmatter. See Global variables.

redirects

redirectsobject

Centralized { "from": "to" } map for forwarding old URLs whose page files were removed. Keys are old root-relative doc paths; values are the destinations. Keys and values are matched tolerant of leading and trailing slashes.

json
"redirects": {
  "/old-guide": "/guides/getting-started",
  "installation/setup": "/getting-started",
  "/legacy-api": "https://api.example.com/reference"
}

Values may be internal root-relative paths (resolved against the current routing mode and ref, like frontmatter redirect) or external http(s):// / // URLs (returned unchanged). Each match issues a 307 Temporary Redirect.

This map is consulted only when no .mdx file exists at the requested path (a deleted or moved page). When a file is still present, its own frontmatter redirect governs instead. See Redirects.

scripts

Analytics and tag-manager injection on published pages only, not during local preview.

scripts.googleTagManagerstring

Google Tag Manager container ID (for example GTM-XXXX). When set, direct Google Analytics injection is skipped even if googleAnalytics is also present.

scripts.googleAnalyticsstring

GA4 measurement ID (for example G-GXXXX). Used only when googleTagManager is not set.

scripts.plausiblestring | boolean

Plausible analytics. Set to true for the hosted Plausible script, or a string URL for self-hosted Plausible. Requires a mapped custom domain or vanity subdomain, and is inactive on the default docs.page/{owner}/{repo} path.

See Analytics.

search

social

Footer social profile URLs. Each key is an optional URL string.

KeyDescription
social.websiteProject or company website
social.xX (Twitter) profile
social.youtubeYouTube channel
social.facebookFacebook page
social.instagramInstagram profile
social.linkedinLinkedIn page
social.githubGitHub organization or user
social.slackSlack community invite or workspace
social.discordDiscord server invite
json
"social": {
  "github": "https://github.com/acme",
  "x": "https://x.com/acme"
}

See Social links.

og

Open Graph image generation defaults when no page or site image is set.

og.logostring

Logo URL embedded in auto-generated social preview images.

og.githubboolean

Include the GitHub repository name in generated preview images. Default: true.

agent

Ask AI chat panel configuration. Beta.

agent.keystring

Agent credential key returned by docs agent create. Required to enable the in-docs chat panel.

agent.placeholderstring

Placeholder text in the empty question input.

agent.questionsstring[]

Suggested starter questions shown before the reader types.

agent.limits.ipnumber

Maximum chat requests per IP per hour. Default: 200.

agent.limits.reponumber

Maximum chat requests per repository per hour. Default: 10000.

See Ask AI.

mcp

mcp.enabledboolean

Expose the per-repository MCP endpoint at /{owner}/{repo}/mcp. Default: true. Set to false to return 404 on the MCP route.

See MCP server.

See also