docs(v2): add documentation about importing code files#4974
docs(v2): add documentation about importing code files#4974slorber merged 3 commits intofacebook:masterfrom
Conversation
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
|
✔️ [V2] 🔨 Explore the source changes: 4068695 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60c8d34f7cd3f9000870e8a4 😎 Browse the preview: https://deploy-preview-4974--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4974--docusaurus-2.netlify.app/ |
|
Thanks I'm going to merge this because some users already use it and we also use it internally, but some concerns:
|
|
|
||
| You have to use `<CodeBlock>` rather than the Markdown triple-backtick ` ``` `, because the latter will ship out any of its content as-is, but you want JSX to insert the imported text here. | ||
|
|
||
| ::: |
There was a problem hiding this comment.
can you add a warning here and mention that this is experimental and API breaking changes are expected on this
we'll replace raw loader by https://webpack.js.org/guides/asset-modules/#replacing-inline-loader-syntax
There was a problem hiding this comment.
Sure, will work on this in a moment
There was a problem hiding this comment.
we'll replace raw loader by https://webpack.js.org/guides/asset-modules/#replacing-inline-loader-syntax
Should I change my demo case in the documentation, or is this just a plan?
There was a problem hiding this comment.
we don't support ?raw syntax yet so we'll document it once we support it, for now you can keep documenting raw-loader usage
There was a problem hiding this comment.
Should I add a warning then, or should we just keep it in mind and come back once the support is in place?
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Motivation
Resolve #4540. Yet another PR trying to migrate contents from the example MD page to the real documentation. I wonder what's the "recipes section" going to look like and whether I can help with that 🤔
I also did some minor editing to my previously written section. (#4958)
Have you read the Contributing Guidelines on pull requests?
Yes