Skip to content

Commit 0133865

Browse files
committed
Add GITHUB_TOKEN with DOCUSAURUS_GIT_TOKEN fallback
1 parent eb756c4 commit 0133865

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docusaurus.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ const config: Config = {
245245
// },
246246
} satisfies Preset.ThemeConfig,
247247

248+
// Migrated legacy setting to markdown.hooks.onBrokenMarkdownLinks
248249
markdown: {
249250
mermaid: true,
251+
// ✅ CORRECT for Docusaurus 3.9+
250252
hooks: { onBrokenMarkdownLinks: "warn" },
251253
},
252254

253-
// Migrated legacy setting to markdown.hooks.onBrokenMarkdownLinks
254-
255255
themes: ["@docusaurus/theme-mermaid"],
256256

257257
plugins: [
@@ -269,7 +269,8 @@ const config: Config = {
269269

270270
// ✅ Add this customFields object to expose the token to the client-side
271271
customFields: {
272-
gitToken: process.env.DOCUSAURUS_GIT_TOKEN,
272+
gitToken: process.env.GITHUB_TOKEN || process.env.DOCUSAURUS_GIT_TOKEN,
273+
273274
// Shopify credentials for merch store
274275
SHOPIFY_STORE_DOMAIN:
275276
process.env.SHOPIFY_STORE_DOMAIN || "junh9v-gw.myshopify.com",

0 commit comments

Comments
 (0)