Skip to content

chore(mdx): use mdx instead within docs/api - #3455

Merged
thetaPC merged 9 commits into
mdx-pt-1from
mdx-pt-2
Mar 29, 2024
Merged

chore(mdx): use mdx instead within docs/api#3455
thetaPC merged 9 commits into
mdx-pt-1from
mdx-pt-2

Conversation

@thetaPC

@thetaPC thetaPC commented Feb 15, 2024

Copy link
Copy Markdown
Contributor

Issue URL: N/A

What is the current behavior?

Some files are using the .md extension. Docusaurus v3 has stated that at some point that these files will no longer be parsed as expected and will parsed as CommonMark. They advice to use .mdx instead.

What is the new behavior?

  • docs/api/ files have been switched from .md to .mdx
  • Switched to the proper syntax for MDX comments.
  • Updated paths to no longer reference .md

same for v5 and v6

Does this introduce a breaking change?

  • Yes
  • No

Other information

I'm splitting these into smaller PRs to make it easier to review.

API docs

@vercel

vercel Bot commented Feb 15, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2024 8:31pm

@thetaPC
thetaPC marked this pull request as ready for review February 15, 2024 20:05
@thetaPC
thetaPC requested a review from a team as a code owner February 15, 2024 20:05
@thetaPC
thetaPC requested review from mapsandapps and removed request for a team February 15, 2024 20:05
Comment thread docs/api/buttons.mdx
:::

<!-- Reuse the playground from the Title directory -->
{/* Reuse the playground from the Title directory */}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Switched to the proper syntax for MDX.

Comment thread docs/api/grid.mdx Outdated


The grid is a powerful mobile-first flexbox system for building custom layouts. It is composed of three units — a grid, [row(s)](row.md) and [column(s)](col.md). Columns will expand to fill the row, and will resize to fit additional columns. It is based on a 12 column layout with different breakpoints based on the screen size. The number of columns can be customized using CSS.
The grid is a powerful mobile-first flexbox system for building custom layouts. It is composed of three units — a grid, [row(s)](row) and [column(s)](col). Columns will expand to fill the row, and will resize to fit additional columns. It is based on a 12 column layout with different breakpoints based on the screen size. The number of columns can be customized using CSS.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated paths to no longer reference .md

@mapsandapps mapsandapps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All the changes here look good, but I did have some questions. If these are in another PR or something, lmk:

probably relevant to this PR:

  • docusaurus.config.js: change lines 42-43 from .md to .mdx? (i didn't look into what this is used for; maybe we need to match both .md and .mdx and return .mdx?)
  • _templates/README.md: line 24

also, the links in these to /api/foo.md seem to work, but maybe they should be changed for consistency?

  • cross-platform.md
  • structure.md
  • css-shadow-parts.md
  • css.variables.md
  • 4-0.md

probably not relevant to this PR, but is there a plan to change these things to mdx?

  • package.json: use mdx in npm run spellcheck command
  • .editorconfig: use mdx instead of md (might need no/different rules for mdx, i didn't look into it)
  • CONTRIBUTING.md: change filenames
  • other lines in the docusaurus.config.js

(i marked request changes, but there may not actually be any changes needed, just let me know what's up 😄)

@thetaPC

thetaPC commented Mar 28, 2024

Copy link
Copy Markdown
Contributor Author

@mapsandapps in regards to the last part in your comment: I plan to do that in a separate PR.

@mapsandapps mapsandapps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@thetaPC
thetaPC merged commit 2458484 into mdx-pt-1 Mar 29, 2024
@thetaPC
thetaPC deleted the mdx-pt-2 branch March 29, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants