Skip to content

configuration

API version: Next (unreleased).

Interfaces

DocsConfig

Extended by

Properties

apiNavigation?

optional apiNavigation?: Group[]

basePath?

optional basePath?: string

components?

optional components?: string

Project-relative module exporting a default MDX component map.

optional copyright?: string

description

description: string

favicon?

optional favicon?: ThemeAsset

optional footerLinks?: FooterLink[]

homepage?

optional homepage?: string

Project-relative module exporting a default React homepage.

image?

optional image?: string

imageAlt?

optional imageAlt?: string

lang?

optional lang?: string

optional links?: NavLink[]

optional logo?: ThemeAsset

name

name: string

navigation: Group[]

og?

optional og?: false | OgImageConfig

Automatic 1200 × 630 social image. Set false to disable generation.

pages?

optional pages?: Record<string, string>

Static routes mapped to project-relative modules exporting a default React page.

repository?

optional repository?: string

styles?

optional styles?: string[]

Project-relative CSS files, loaded after the built-in styles.

title?

optional title?: string

url

url: string

Public origin, e.g. https://example.com.

versioning?

optional versioning?: false | VersioningConfig

Enable documentation snapshots and a version selector.


OgImageConfig

Properties

description?

optional description?: string

optional footer?: string

highlight?

optional highlight?: string

logo?

optional logo?: string | false

Local public asset URL. Defaults to the site's light logo.

title?

optional title?: string


ResolvedDocsConfig

Extends

Properties

apiNavigation

apiNavigation: Group[]

Overrides

DocsConfig.apiNavigation

basePath

basePath: string

Overrides

DocsConfig.basePath

components?

optional components?: string

Project-relative module exporting a default MDX component map.

Inherited from

DocsConfig.components

copyright: string

Overrides

DocsConfig.copyright

description

description: string

Inherited from

DocsConfig.description

favicon?

optional favicon?: ThemeAsset

Inherited from

DocsConfig.favicon

footerLinks: FooterLink[]

Overrides

DocsConfig.footerLinks

homepage?

optional homepage?: string

Project-relative module exporting a default React homepage.

Inherited from

DocsConfig.homepage

image?

optional image?: string

Inherited from

DocsConfig.image

imageAlt?

optional imageAlt?: string

Inherited from

DocsConfig.imageAlt

lang

lang: string

Overrides

DocsConfig.lang

links: NavLink[]

Overrides

DocsConfig.links

logo?

optional logo?: ThemeAsset

Inherited from

DocsConfig.logo

name

name: string

Inherited from

DocsConfig.name

navigation: Group[]

Inherited from

DocsConfig.navigation

og

og: false | OgImageConfig

Automatic 1200 × 630 social image. Set false to disable generation.

Overrides

DocsConfig.og

pages?

optional pages?: Record<string, string>

Static routes mapped to project-relative modules exporting a default React page.

Inherited from

DocsConfig.pages

repository?

optional repository?: string

Inherited from

DocsConfig.repository

styles?

optional styles?: string[]

Project-relative CSS files, loaded after the built-in styles.

Inherited from

DocsConfig.styles

title

title: string

Overrides

DocsConfig.title

url

url: string

Public origin, e.g. https://example.com.

Inherited from

DocsConfig.url

versioning

versioning: false | Required<VersioningConfig>

Enable documentation snapshots and a version selector.

Overrides

DocsConfig.versioning


TocItem

Properties

depth

depth: number

id

id: string

title

title: string


VersioningConfig

Properties

currentLabel?

optional currentLabel?: string

defaultVersion?

optional defaultVersion?: "latest" | "next"

Type Aliases

FooterLink = NavLink & object

Type Declaration

icon?

optional icon?: string


Group

Group = object

Properties

items

items: Item[]

label

label: string


Item

Item = NavLink | Group


NavLink = object

Properties

href

href: string

label

label: string


ThemeAsset

ThemeAsset = string | { dark: string; light: string; }

Functions

defineDocs()

defineDocs(config): ResolvedDocsConfig

Parameters

config

DocsConfig

Returns

ResolvedDocsConfig


flattenNavigation()

flattenNavigation(items): NavLink[]

Parameters

items

Item[]

Returns

NavLink[]


normalizeBasePath()

normalizeBasePath(path?): string

Parameters

path?

string = "/"

Returns

string


pagePath()

pagePath(path): string

Preserve assets, external URLs, queries and fragments.

Parameters

path

string

Returns

string


withBasePath()

withBasePath(path, basePath): string

Parameters

path

string

basePath

string

Returns

string

References

DocumentCollection

Re-exports DocumentCollection


DocumentModule

Re-exports DocumentModule


DocumentRecord

Re-exports DocumentRecord


MetadataValues

Re-exports MetadataValues