Skip to content

pantoken-root / renderers/mintlify/src / toMintlifyConfig

Funktion: toMintlifyConfig() ​

toMintlifyConfig(tokens): MintlifyTheme

Experimentell

Erzeuge die Mintlify docs.json Theming-Schlüssel aus einem Token-IR.

Parameter ​

tokens ​

schreibgeschützt Token[]

Das IR (z. B. von @pantoken/tokens).

Rückgabe ​

MintlifyTheme

Die Schlüssel colors + background, die in ein Mintlify docs.json zusammengeführt werden.

Beispiel ​

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" } } }