diff --git a/docusaurus.config.ts b/docusaurus.config.ts index f81c18a..5f67a14 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -25,13 +25,15 @@ import { extendedPostcssConfigPlugin } from "./server/postcss"; const latestVersion = getLatestVersion(); const config: Config = { - onBrokenMarkdownLinks: "throw", customFields: { - innkeepConfig: { - apiKey: process.env.INKEEP_API_KEY, - integrationId: process.env.INKEEP_INTEGRATION_ID, - organizationId: process.env.INKEEP_ORGANIZATION_ID, - }, + inkeepConfig: (() => { + const configVars = process.env.secrets ? JSON.parse(process.env.secrets) : process.env; + return { + apiKey: configVars.INKEEP_API_KEY, + integrationId: configVars.INKEEP_INTEGRATION_ID, + organizationId: configVars.INKEEP_ORGANIZATION_ID, + } + })(), }, clientModules: [ "./src/styles/variables.css", @@ -121,7 +123,7 @@ const config: Config = { }, onBrokenLinks: "warn", - onBrokenMarkdownLinks: "warn", + onBrokenMarkdownLinks: "throw", i18n: { defaultLocale: "en", diff --git a/src/components/Search/InkeepSearch.tsx b/src/components/Search/InkeepSearch.tsx index 75ddc1e..1989764 100644 --- a/src/components/Search/InkeepSearch.tsx +++ b/src/components/Search/InkeepSearch.tsx @@ -41,16 +41,16 @@ export function InkeepSearch() { const { siteConfig } = useDocusaurusContext(); - const innkeepConfig = siteConfig.customFields.innkeepConfig as { + const inkeepConfig = siteConfig.customFields.inkeepConfig as { apiKey: string; integrationId: string; organizationId: string; }; const inkeepBaseSettings: InkeepWidgetBaseSettings = { - apiKey: innkeepConfig.apiKey, - integrationId: innkeepConfig.integrationId, - organizationId: innkeepConfig.organizationId, + apiKey: inkeepConfig.apiKey, + integrationId: inkeepConfig.integrationId, + organizationId: inkeepConfig.organizationId, organizationDisplayName: "Teleport", primaryBrandColor: "#512FC9", chatApiProxyDomain: "goteleport.com/inkeep-proxy",