Skip to content

Commit

Permalink
feat: add portal url to mdx scope (#2907) (#2908)
Browse files Browse the repository at this point in the history
  • Loading branch information
frano-m authored Feb 8, 2024
1 parent fbbec79 commit ed71585
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions next/docs/common/constants.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -26,5 +27,6 @@ export const MDX_COMPONENTS = {
};

export const MDX_SCOPE = {
...getContentScope(),
ANCHOR_TARGET: ANCHOR_TARGET,
};
16 changes: 16 additions & 0 deletions next/docs/common/scope.ts
Original file line number Diff line number Diff line change
@@ -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 };
}

0 comments on commit ed71585

Please sign in to comment.