diff --git a/next/docs/common/constants.ts b/next/docs/common/constants.ts index 18c685df8..79a599df2 100644 --- a/next/docs/common/constants.ts +++ b/next/docs/common/constants.ts @@ -1,6 +1,7 @@ import { ANCHOR_TARGET } from "@clevercanary/data-explorer-ui/lib/components/Links/common/entities"; import * as C from "../../components"; import DataIngestionChart from "../../components/Consortia/CSER/components/DataIngestionChart/dataIngestionChart"; +import { getContentScope } from "./scope"; export const DOC_SITE_FOLDER_NAME = "docs"; @@ -26,5 +27,6 @@ export const MDX_COMPONENTS = { }; export const MDX_SCOPE = { + ...getContentScope(), ANCHOR_TARGET: ANCHOR_TARGET, }; diff --git a/next/docs/common/scope.ts b/next/docs/common/scope.ts new file mode 100644 index 000000000..21e381d23 --- /dev/null +++ b/next/docs/common/scope.ts @@ -0,0 +1,16 @@ +import { config } from "../../config/config"; +import { SiteConfig } from "../../site-config/common/entities"; + +interface ContentScope { + portalURL: string; +} + +/** + * Returns the content scope. + * @returns content scope. + */ +export function getContentScope(): ContentScope { + const siteConfig = config() as SiteConfig; + const portalURL = siteConfig.portalURL; + return { portalURL }; +}