title | description |
---|---|
Configuration |
Configure your documentation with a docs.json file. |
Add a docs.json
file to the root of your GitHub repository to configure your documentation.
Below is a list of all available configuration options, which can be used to modify the logos, theme, analytics and more.
If your IDE supports JSON Schemas, you can add a $schema
property to your docs.json
file to enable autocompletion and validation:
{
"$schema": "https://docs.page/schema.json"
}
A short description of your project. This will be used in meta tags and social preview images.
Defines the favicon to show in the browser tab.
See Asset URLs for more information on how to add assets to your documentation.
The favicon can either be a string
value which will be used for both light and dark modes, or a Favicon
object to define separate favicons for light and dark modes.
---
<Property name="dark" type="string">
The Asset URL of your favicon to display when the documentation is in dark mode.
</Property>
An asset URL to use as the default social preview image for your documentation.
If not provided, a social preview image will be automatically generated. Individual pages can override this social preview URL by specifying a socialPreview
property in their frontmatter.
See Asset URLs for more information on how to add assets to your documentation.
Configures the logo of your documentation, which will be displayed in the header and used for social preview images.
The minimum height of the logo should be 24px. Note that if only a light or dark logo is provided, it will be used for both light and dark modes.
See Asset URLs for more information on how to add assets to your documentation.
The Asset URL of your logo to display when the documentation is in light mode.---
<Property name="dark" type="string">
The Asset URL of your logo to display when the documentation is in dark mode.
</Property>
---
<Property name="primary" type="string">
A hex color code to use as the primary color of your documentation. This color will be used for links, buttons, and other interactive elements.
</Property>
---
<Property name="primaryLight" type="string">
A hex color code to use as the primary color of your documentation in light mode. If not specified, the `primary` color will be used.
</Property>
---
<Property name="primaryDark" type="string">
A hex color code to use as the primary color of your documentation in dark mode. If not specified, the `primary` color will be used.
</Property>
---
<Property name="backgroundLight" type="string">
A hex color code to use as the background color of your documentation in light mode.
</Property>
---
<Property name="backgroundDark" type="string">
A hex color code to use as the background color of your documentation in dark mode.
</Property>
---
<Property name="showThemeToggle" type="boolean">
Whether to show the theme toggle button in the header. Defaults to `true`.
</Property>
---
<Property name="showGitHubCard" type="boolean">
Whether to show the GitHub card in the header. Defaults to `true`.
</Property>
---
<Property name="links" type="Link[]">
An array of `Link` objects to display in the header of your documentation.
<Accordion title="Link">
<Property name="href" type="string" required>
The URL to link to.
</Property>
---
<Property name="title" type="string" required>
The text to display for the link.
</Property>
---
<Property name="cta" type="boolean">
Whether to display the link as a call-to-action button. Defaults to `false`.
</Property>
---
<Property name="locale" type="string">
If provided, only show this link when viewing the documentation for a specific [locale](/locales).
</Property>
</Accordion>
</Property>
---
<Property name="href" type="string" required>
The URL to link to.
</Property>
---
<Property name="icon" type="string" required>
The [icon](/components/icons) to display next to the anchor link.
</Property>
---
<Property name="locale" type="string">
If provided, only show this anchor when viewing the documentation for a specific [locale](/locales).
</Property>
---
<Property name="tab" type="string">
If provided, only show this anchor when viewing a specific [tab](/navigation#tabs).
</Property>
{
"social": {
"x": "@invertaseio",
"github": "invertase"
}
}
---
<Property name="x" type="string">
The name of your X/Twitter account, e.g. `@invertaseio`.
</Property>
---
<Property name="youtube" type="string">
The name of your YouTube account.
</Property>
---
<Property name="facebook" type="string">
The name of your Facebook account.
</Property>
---
<Property name="instagram" type="string">
The name of your Instagram account.
</Property>
---
<Property name="linkedin" type="string">
The name of your LinkedIn account.
</Property>
---
<Property name="github" type="string">
The name of your GitHub account.
</Property>
---
<Property name="slack" type="string">
The subdomain of your Slack organization.
</Property>
---
<Property name="discord" type="string">
The name of your Discord organization.
</Property>
{
"variables": {
"versions": {
"default": "1.0.0",
}
}
}
Can be replaced via the {{ versions.default }}
syntax in your documentation content.
<Accordion title="DocSearch">
<Property name="appId" type="string" required>
The DocSearch application ID for your documentation.
</Property>
---
<Property name="apiKey" type="string" required>
The DocSearch API key for your documentation.
</Property>
---
<Property name="indexName" type="string" required>
The DocSearch index name for your documentation.
</Property>
</Accordion>
</Property>
---
<Property name="googleAnalytics" type="string">
The Google Analytics ID to include in your documentation.
</Property>
---
<Property name="plausible" type="string | boolean">
If provided and your documentation uses a [Custom Domain](/custom-domains), the [Plausible Analytics](https://plausible.io/) domain to include in your documentation.
If set to `true`, the default Plausible Analytics script (`https://plausible.io/js/plausible.js`) will be used. Provide a string to use a custom self hosted Plausible Analytics script.
</Property>
---
<Property name="zoomImages" type="boolean">
Whether to enable image zooming by default for all images in your documentation. Defaults to `false`.
See the [`<Image />`](/components/images) component for more information on how to enable image zooming for specific images.
</Property>
---
<Property name="automaticallyInferNextPrevious" type="boolean">
Whether to automatically infer the next and previous page links based on your sidebar navigation. Defaults to `true`.
</Property>
---
<Property name="showPageTitle" type="boolean">
Whether to automatically show the page title from frontmatter at the top of each page. Defaults to `true`.
</Property>
---
<Property name="showPageImage" type="boolean">
Whether to automatically show the page social image from frontmatter at the top of each page. Defaults to `true`.
</Property>
---
<Property name="title" type="string" required>
The title of the tab to display.
</Property>
---
<Property name="href" type="string" required>
The URL to link to when the tab is clicked.
</Property>
---
<Property name="locale" type="string">
If provided, only show this tab when viewing the documentation for a specific [locale](/locales).
</Property>
<Accordion title="Page" defaultOpen>
<Property name="title" type="string" required>
The title of the sidebar item.
</Property>
---
<Property name="href" type="string" required>
The URL to link to when the sidebar item is clicked.
</Property>
---
<Property name="icon" type="string">
The [icon](/components/icons) to display next to the sidebar item.
</Property>
</Accordion>
</Property>
---
<Property name="group" type="string">
The group title to display the sidebar item in. If not provided, the sidebar item will be displayed at the top level.
</Property>
---
<Property name="href" type="string">
The URL to link to when the sidebar item is clicked.
</Property>
---
<Property name="icon" type="string">
The [icon](/components/icons) to display next to the sidebar item.
</Property>
---
<Property name="tab" type="string">
If provided, only show this sidebar item when viewing a specific [tab](/navigation#tabs).
</Property>