|
1
|
// Options for `crossProjectLinksPlugin`, shared between the MDX rendering |
|
2
|
// pipeline in `next.config.mjs` (the rendered intro page) and the Markdown |
|
3
|
// generator in `utils/markdown/intro-to-markdown.ts` (the `.md` intro), so that |
|
4
|
// `!docs!` / `!resources!` / `!user-guide!` links resolve identically in both. |
|
5
|
// |
|
6
|
// Kept as `.mjs` (plain JS) so `next.config.mjs` can import it directly. |
|
7
|
export const crossProjectLinksOptions = { |
|
8
|
baseUrl: process.env.NEXT_PUBLIC_BASE_URL || "", |
|
9
|
projectUrls: { |
|
10
|
docs: { url: process.env.NEXT_PUBLIC_DOCS_URL, path: "" }, |
|
11
|
resources: { url: process.env.NEXT_PUBLIC_RESOURCES_URL }, |
|
12
|
"user-guide": { url: process.env.NEXT_PUBLIC_USER_GUIDE_URL }, |
|
13
|
ui: { url: process.env.NEXT_PUBLIC_UI_URL }, |
|
14
|
cloud: { url: process.env.NEXT_PUBLIC_CLOUD_URL }, |
|
15
|
}, |
|
16
|
useBaseUrl: |
|
17
|
process.env.NODE_ENV === "production" || |
|
18
|
process.env.VERCEL_ENV === "production" || |
|
19
|
!!process.env.CLOUDFLARE_ENV, |
|
20
|
} |