-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(v2): add documentation about importing code files #4974
Conversation
Signed-off-by: Josh-Cena <[email protected]>
✔️ [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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will work on this in a moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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