Skip to content

Commit

Permalink
more shortcodes for any components imported to mdx
Browse files Browse the repository at this point in the history
Signed-off-by: Randy Lau <[email protected]>
  • Loading branch information
randychilau committed Jul 15, 2023
1 parent 42bd0bc commit 537bfde
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
13 changes: 9 additions & 4 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ import sectionTemplate from "./src/sections/Learn-Layer5/Section/index.js";
import chapterTemplate from "./src/templates/learn-chapter.js";
import courseOverviewTemplate from "./src/templates/course-overview.js";
import courseListTemplate from "./src/templates/courses-list.js";
//
// import from "./src/sections/Careers/Careers-Programs-grid/index.js""
// );
import DockerExtensionCTA from "./src/sections/Docker-Meshery/docker-extension-CTA";
import InlineQuotes from "./src/components/Inline-quotes";
import Table from "./src/components/service-mesh-patterns-Table/Table.js";
import CommonForm from "./src/components/CommonForm";

//workaround to resolve build heap OOM error due to mdxv2 upgrade (ref: https://github.com/gatsbyjs/gatsby/issues/36899#issuecomment-1422616312), revisit with upgrade to gatsby v5 and gatsby-plugin-mdx if still applicable
// eslint-disable-next-line no-unused-vars
Expand Down Expand Up @@ -79,7 +80,11 @@ const MDXComponents = [
sectionTemplate,
chapterTemplate,
courseOverviewTemplate,
courseListTemplate
courseListTemplate,
DockerExtensionCTA,
InlineQuotes,
Table,
CommonForm,
];

export { onRenderBody } from "./onRenderBody";
Expand Down
10 changes: 9 additions & 1 deletion root-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from "react";
import { MDXProvider } from "@mdx-js/react";
import { ContextWrapper } from "./context-wrapper";
import Code from "./src/components/CodeBlock";

import CTA_ImageOnly from "./src/components/Call-To-Actions/CTA_ImageOnly";
import CTA_FullWidth from "./src/components/Call-To-Actions/CTA_FullWidth";
import CTA_Bottom from "./src/components/Call-To-Actions/CTA_Bottom";

import FAQ from "./src/sections/General/Faq";
import { Link } from "gatsby";
import { BlogWrapper } from "./src/collections/blog/Blog.style.js";
Expand All @@ -25,6 +25,10 @@ import { Col } from "./src/reusecore/Layout";
import Button from "./src/reusecore/Button";
import Blockquote from "./src/reusecore/Blockquote";
import BlockquoteAlt from "./src/reusecore/Blockquote/Blockquote-alt-style";
import DockerExtensionCTA from "./src/sections/Docker-Meshery/docker-extension-CTA";
import InlineQuotes from "./src/components/Inline-quotes";
import Table from "./src/components/service-mesh-patterns-Table/Table.js";
import CommonForm from "./src/components/CommonForm";

const components = {
pre: ({ children: { props, type } }) => {
Expand Down Expand Up @@ -61,6 +65,10 @@ const components = {
ProgramsWrapper,
ProjectWrapper,
ResourcesWrapper,
CommonForm,
Table,
DockerExtensionCTA,
InlineQuotes
};

export const wrapRootElement = ({ element }) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ resource: true
type: Blog
---



import bugEnvoy from "./debug-envoy-proxy.svg";
import DockerExtensionCTA from "../../../../sections/Docker-Meshery/docker-extension-CTA";
import Code from "../../../../components/CodeBlock";


<BlogWrapper>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import GlobeIcon from "./globe.svg";
import UsersIcon from "./users.svg";
import NetworkIcon from "./network.svg";
import LayersIcon from "./layers.svg";
import InlineQuotes from "../../../../components/Inline-quotes";
import MesheryIntegration from "./meshery-integrations.svg";
import Maxi from "../../../../collections/members/maximiliano-churichi/Maximiliano-Churichi.webp";
import Yogi from "./yogi.webp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ redirect_from:
- /books/service-mesh-patterns
---


import Table from "../../../components/service-mesh-patterns-Table/Table.js";


import service_mesh_pattern_book from "./service-mesh-patterns.webp"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ redirect_from:
- /books/the-enterprise-path-to-service-mesh-architectures-2nd-Edition
---


import service_mesh_book_second_edition from "./The-Enterprise-path-to-service-mesh-Architectures-2nd-Edition.webp"

import CommonForm from "../../../components/CommonForm";

<BookWrapper>

<div className="book"><a href={service_mesh_book_second_edition}><img className="card" width="300px" src={service_mesh_book_second_edition} alt="The-Enterprise-Path-to-Service-Mesh-Architectures" align="centre" /></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ redirect_from:

import service_mesh_ent_book from "./The-Enterprise-Path-to-Service-Mesh-Architectures.webp"

import CommonForm from "../../../components/CommonForm";


<BookWrapper>

Expand Down

0 comments on commit 537bfde

Please sign in to comment.