Skip to content

pantoken / renderers/mintlify/src / toMintlifyConfig

Function: toMintlifyConfig()

toMintlifyConfig(tokens): MintlifyTheme

Experimental

Build the Mintlify docs.json theming keys from a token IR.

Parameters

tokens

readonly Token[]

The IR (e.g. from @pantoken/tokens).

Returns

MintlifyTheme

The colors + background keys to merge into a Mintlify docs.json.

Example

ts
import { toMintlifyConfig } from "@pantoken/mintlify";
import { tokens } from "@pantoken/tokens";

const theme = toMintlifyConfig(tokens);
// { colors: { primary: "#1D354F", light: "#EEF4FD", dark: "#1D354F" },
//   background: { color: { light: "#F2F4F5", dark: "#10141A" } } }