Skip to content

docs(v2): add documentation about importing markdown#4958

Merged
slorber merged 3 commits intofacebook:masterfrom
Josh-Cena:master
Jun 15, 2021
Merged

docs(v2): add documentation about importing markdown#4958
slorber merged 3 commits intofacebook:masterfrom
Josh-Cena:master

Conversation

@Josh-Cena
Copy link
Collaborator

Motivation

The website has a hidden Markdown page example. It includes an example of importing markdown, which is not documented anywhere else on the website.

On Discord people often ask about reusing Markdown files, and I have to give them links to this hidden file. It would be great if it can be documented in the actual documentation.

I'm not sure if I'm putting this section in the right place...

Have you read the Contributing Guidelines on pull requests?

Yep

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@Josh-Cena Josh-Cena requested review from lex111 and slorber as code owners June 14, 2021 04:16
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 14, 2021
@netlify
Copy link

netlify bot commented Jun 14, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: d4d95fb

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60c87c93be205e0007fbc569

😎 Browse the preview: https://deploy-preview-4958--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Jun 14, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 60
🟢 Accessibility 97
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-4958--docusaurus-2.netlify.app/

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍 just added a warning for the TOC problem

@Josh-Cena
Copy link
Collaborator Author

Thanks 👍 just added a warning for the TOC problem

Yep, I realized that as well when I was testing this feature... I'm still stuck with understanding how the MDX loader works, so can't help rn with this

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@slorber
Copy link
Collaborator

slorber commented Jun 15, 2021

Thanks for prettier 😅

MDX basically converts md to a React component. In the end, Babel/Webpack just see a regular React comp.

The playground might help to understand: https://mdxjs.com/playground/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants