Skip to content
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

Migrate docs to MDX (en-only) #2133

Merged
merged 88 commits into from
Dec 28, 2022
Merged

Migrate docs to MDX (en-only) #2133

merged 88 commits into from
Dec 28, 2022

Conversation

delucis
Copy link
Member

@delucis delucis commented Dec 2, 2022

Jump to deploy preview 🚀

What kind of changes does this PR include?

  • Changes to the docs site code

Description

  • Migrate the docs to use the MDX integration, switching to .mdx files for content.
  • Renames all content from .md to .mdx moving any imports out of setup in frontmatter and down the MDX body.
    Here’s a gist of the script I used to automate AFMD to MDX migration in case it’s useful to anyone.
  • Updates layouts, scripts, components, etc. to expect a mixed MD/MDX codebase. Should I just pull the plug and make it MDX-only? (N.B. Spoiler syntax ||text|| now only supports MDX as I couldn’t figure out how to make a micromark syntax-extension handle both MD & MDX.)
  • Turns off AFMD 😢👋

To-do

  • Render <Content /> that contains a fragment — 🚫 Currently blocked by Rendering <Content /> fails for MDX file containing <Fragment> astro#5519
  • Solve out-of-memory error in Netlify & GitHub Action builds
    For now, we’re setting the NODE_OPTIONS environment variable to --max_old_space_size=4096 to increase memory limits in both CI environments.
  • Fix <Aside /> usage/custom syntax
  • Probably also fix ||spoiler syntax||
  • Fix differences in heading IDs between AFMD & MDX

@netlify
Copy link

netlify bot commented Dec 2, 2022

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit b22c42f
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/63ac66b628453e0009802833
😎 Deploy Preview https://deploy-preview-2133--astro-docs-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.

@delucis delucis marked this pull request as ready for review December 28, 2022 10:28
@delucis delucis changed the title WIP: Migrate docs to MDX (en-only) Migrate docs to MDX (en-only) Dec 28, 2022
@sarah11918
Copy link
Member

What an amazing job @delucis 🚀 💪 🙌

Admittedly, I haven't clicked through every single page, but I tested a number of our more "interesting" pages, and I haven't yet found anything that looks off! Lots of time for people to click around and verify, and no problem to fix smaller things after the fact. So, I can't see any reason not to approve this! New year, new Docs tech! 🥳

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

End of an Astro-Flavored Markdown era!

Copy link
Member

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

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

Great job @delucis! 🙌

Looked through almost all pages and checked some less noticeable use of components (dev mode only warning aside, version, etc) and everything LGTM!

@delucis delucis merged commit e58d23c into main Dec 28, 2022
@delucis delucis deleted the chris/mdx branch December 28, 2022 16:08
trueberryless added a commit to trueberryless/withastro-docs that referenced this pull request Oct 22, 2024
yanthomasdev added a commit that referenced this pull request Nov 4, 2024
* update translation #1442

* update translation #1434

* update translation #1510

* update translation #1538

* Update src/content/docs/de/basics/astro-pages.mdx

* Update src/content/docs/de/basics/astro-pages.mdx

* Update src/content/docs/de/basics/astro-pages.mdx

* Update src/content/docs/de/basics/astro-pages.mdx

* Update src/content/docs/de/basics/astro-pages.mdx

* update translation #1638

* update translation #2091

* update translation #2133

* update translation #2409

* update translation #2371

* update translation #4610

* update translation #5128

* update translation #5205

* update translation #5240

* update translation #5364

* update translation #5765

* update translation #6267

* remove paragraph where I cant find when it was deleted in original version

* update translation #6620

* update translation #8495

* update translation #8573

* update translation #9336

* update translation #9336 2/2

didnt save file locally, so git didnt add

* fix all visual differences by comparing manually against original english version

* fix broken links in `astro-pages.mdx`

* Breaking changes to other files! fixing links which link to the �stro-pages.mdx file

* but now...

* Update src/content/docs/de/basics/astro-pages.mdx

Co-authored-by: Max <[email protected]>

* Update src/content/docs/de/basics/astro-pages.mdx

Co-authored-by: Max <[email protected]>

* Update src/content/docs/de/basics/astro-pages.mdx

Co-authored-by: Max <[email protected]>

* revert Update markdown-content.mdx

@lunaria-track:src/content/docs/de/basics/astro-pages.mdx

---------

Co-authored-by: Max <[email protected]>
Co-authored-by: Yan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants