Skip to content

Commit

Permalink
a bit drier config code
Browse files Browse the repository at this point in the history
  • Loading branch information
taraspos committed Nov 1, 2024
1 parent ce70b1b commit faa9190
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,12 @@ const latestVersion = getLatestVersion();
const config: Config = {
customFields: {
inkeepConfig: (() => {
var config = {
apiKey: process.env.INKEEP_API_KEY,
integrationId: process.env.INKEEP_INTEGRATION_ID,
organizationId: process.env.INKEEP_ORGANIZATION_ID,
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,
}
if (process.env.secrets) {
const secretJson = JSON.parse(process.env.secrets);
config.apiKey = secretJson.INKEEP_API_KEY;
config.integrationId = secretJson.INKEEP_INTEGRATION_ID;
config.organizationId = secretJson.INKEEP_ORGANIZATION_ID;
}
return config
})(),
},
clientModules: [
Expand Down

0 comments on commit faa9190

Please sign in to comment.