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"
}
Top-level properties
name
string
The name of your project. This will be displayed in the header of your documentation and used for other aspects such as automatic social preview images.
description
string
A short description of your project. This will be used in meta tags and social preview images.
favicon
string | Favicon
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.
socialPreview
string
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.
Logo
logo
Logo
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.
Theme
theme
Theme
Configures the theme of your documentation. If not provided, a default theme will be used.
Social Links
social
object
An object of key value pairs where the key is the social platform and the value is the username/ID to link to:
{
"social": {
"x": "@invertaseio",
"github": "invertase"
}
}
Variables
variables
object
An object of common variables which can be replaced in your documentation content using the {{ variableName }}
syntax. For example, the following:
{
"variables": {
"versions": {
"default": "1.0.0",
}
}
}
Can be replaced via the {{ versions.default }}
syntax in your documentation content.
Tabs
tabs
Tab[]
An array of Tab
objects to display at the top of your documentation. See Navigation for more information on how to configure tabs.
Sidebar
sidebar
Sidebar[] | Record<string, Sidebar>
An array or object of Sidebar
objects to display in the sidebar of your documentation. See Navigation for more information on how to configure the sidebar.