docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

docs: the documentation, starter templates and tutorials should use the .mdx extension

Open slorber opened this issue 3 years ago â€ĸ 4 comments

As part of the MDX 2 migration (https://github.com/facebook/docusaurus/pull/8288) we want to encourage the usage of the .mdx extension, as it's historically not good to use .md and compile with MDX

For example, tooling (IDE, Prettier...) doesn't understand JSX when inside .md files

Also related to:

  • https://github.com/facebook/docusaurus/pull/8490
  • https://github.com/facebook/docusaurus/pull/8507

slorber avatar Jan 04 '23 19:01 slorber

[V2]

Name Link
Latest commit 616440622f7562df6bba02e7fdde0325c007c6b5
Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/63b7036358f2bf0008ccd831
Deploy Preview https://deploy-preview-8508--docusaurus-2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Jan 04 '23 19:01 netlify[bot]

âšĄī¸ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ đŸŸĸ 90 đŸŸĸ 97 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 90 Report
/docs/installation 🟠 72 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 100 đŸŸĸ 90 Report

github-actions[bot] avatar Jan 04 '23 19:01 github-actions[bot]

Size Change: 0 B

Total Size: 889 kB

â„šī¸ View Unchanged
Filename Size
website/.docusaurus/globalData.json 71 kB
website/build/assets/css/styles.********.css 112 kB
website/build/assets/js/main.********.js 665 kB
website/build/index.html 40.9 kB

compressed-size-action

github-actions[bot] avatar Jan 04 '23 19:01 github-actions[bot]

Hmmm, actually not 100% sure we should always encourage using .mdx extension by default. Others (Nextra, Astro...) do not.

I will have to explore what works and what doesn't anymore when using the .md extension, it's not 100% clear but I think most things may keep working (admonitions, links, asset requires etc...)

slorber avatar Jan 05 '23 17:01 slorber

Indeed most things keep working in commonmark, and we want to fix things that do not yet.

Related to https://github.com/facebook/docusaurus/issues/9092

Closing tis PR for now

slorber avatar Sep 25 '23 13:09 slorber