From 5f1edd5ac84b0707c1fab4c93009aa90aa440ce1 Mon Sep 17 00:00:00 2001 From: nate contino Date: Thu, 3 Mar 2022 16:09:16 -0700 Subject: [PATCH] docs: simplify imported code blocks syntax (#6830) * refactor: simplify imported code blocks - Use `language=` prop instead of "className="language-" for imported code blocks I've been using this in my personal projects ([example](https://raw.githubusercontent.com/nathan-contino-mongo/docusaurus-realm/9a2ebb6a43bbbd7b38899fcc86c903dcc1f61283/docs/sdk/kotlin/migrate-from-java-sdk.mdx)) since it is less verbose. If this interface is somehow less stable than the `className` prop, feel free to close this. But if both will work going forward we should probably recommend the simpler of the two. * Update markdown-features-react.mdx --- .../docs/guides/markdown-features/markdown-features-react.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/guides/markdown-features/markdown-features-react.mdx b/website/docs/guides/markdown-features/markdown-features-react.mdx index be6f0018fa..08530fd72e 100644 --- a/website/docs/guides/markdown-features/markdown-features-react.mdx +++ b/website/docs/guides/markdown-features/markdown-features-react.mdx @@ -352,7 +352,7 @@ Now you can import code snippets from another file as it is: import CodeBlock from '@theme/CodeBlock'; import MyComponentSource from '!!raw-loader!./myComponent'; -{MyComponentSource} +{MyComponentSource} ``` @@ -362,7 +362,7 @@ import MyComponentSource from '!!raw-loader!@site/src/pages/examples/_myComponen -{MyComponentSource} +{MyComponentSource}