-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(www): 25 Workflows - Embedding components in Markdown with MDX #14543
docs(www): 25 Workflows - Embedding components in Markdown with MDX #14543
Conversation
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.
Looking good! I had a few suggestions, but it's in really good shape otherwise. Thanks for working on this!
# Conflicts: # docs/docs/adding-markdown-pages.md # docs/docs/mdx/writing-pages.md
…om/gillkyle/gatsby into www/docs-workflow-markdown-and-mdx
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.
Now that MDX is stable, @ChristopherBiscardi moved gatsby-mdx
to gatsby-plugin-mdx
, so we should use gatsby-plugin-mdx
from now on.
I stopped changing these, but in this whole section, gatsby-mdx
needs to be replaced with gatsby-plugin-mdx
.
Also I was thinking about the heading of this whole section:
Adding Components to Content with MDX
Make more sense as something like:
Adding JavaScript to Markdown with MDX
cc @marcysutton
|
||
Similarly to what you'd do in JSX, you can import and render components | ||
with JSX. You can also import other MDX documents. | ||
## Importing JSX components and MDX documents |
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 this be "Importing JSX components in MDX documents"?
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.
I think the "and" is good because it shows that both can be imported rather than just React components. JSX components and MDX documents are able to be imported in an MDX file.
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.
ok, we can leave as-is!
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.
I recommend that we merge this PR and make incremental updates afterward. A lot of the remaining items are around integrating docs from other sites/adding redirects. It's best to keep this moving as we want to start communicating about gatsby-plugin-mdx
in the Gatsby docs, and this is the start of that effort (thanks @amberleyromo for surfacing that info!).
One outstanding item was whether to rename "Adding Components to Content with MDX" – this is an ongoing discussion that we should continue beyond this PR!
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.
This is looking great! ✨
Sounds like the preferred route is merge this now and incrementally improve things like an MDX section in the Gatsby API. I think that sounds great 👍 |
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.
merge this now and incrementally improve things like an MDX section in the Gatsby API
👍👍👍
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.
Hey @gillkyle! I ended up making some suggestions for a landing page title change so we can close out that discussion while we're in here (the URL is all good). Thanks for your patience on this one!
Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com>
…om/gillkyle/gatsby into www/docs-workflow-markdown-and-mdx
Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com>
Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com>
…om/gillkyle/gatsby into www/docs-workflow-markdown-and-mdx # Conflicts: # www/src/data/sidebars/doc-links.yaml
After like 10 weird merge conflicts from applying suggestions in weird orders and merging master all the titles now reflect "Adding Components to Markdown with MDX" 😅 |
This is so great. Thanks again for your work on it @gillkyle, and to @johno and @amberleyromo for reviews! |
* master: (41 commits) chore(release): Publish fix(gatsby): Normalize paths for run queries before caching (#14910) chore(release): Publish fix(gatsby-cli): add missing node-fetch dependency (#14908) feat(blog): Site Showcase Validator blogpost (#14855) chore(gatsby-remark-graphviz): add --ignore for test directory (#14906) fix(tutorials): rename "advanced" to "additional (#14847) fix(starters): update gatsby monorepo (#14886) chore(starters): Switch to useStaticQuery (#14857) chore(release): Publish Add status bar to bottom of screen during develop (#14874) chore(release): Publish fix(*): fix gatsby-cli dep in source-filesystem & plugin-sharp (#14881) docs(www): 25 Workflows - Embedding components in Markdown with MDX (#14543) docs(blog): add case study blog post for The Couch / Prima (#14871) docs(www): 25 Workflows - Adding CSS and/or Sass (#14779) fix(gatsby-transformer-react-docgen): always create description nodes (#14876) chore(release): Publish chore(gatsby): revert progressbar functionality (#14884) Revised "winning over engineering leaders" Docs page (#14830) ...
…atsbyjs#14543) * chore: updates to docs to improve examples and provide more detailed explanations * fix: simple grammatcial changes * fix: PR review suggestions * fix: correct code block titles and update example inline jsx * Amberleys PR comments * feat: add mdx as a title to code blocks * add link to glossary for components to help disambiguate * Update docs/docs/mdx/index.md Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update docs/docs/mdx/index.md Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/data/sidebars/doc-links.yaml Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * local merge conflicts + github suggestions = confusion
…atsbyjs#14543) * chore: updates to docs to improve examples and provide more detailed explanations * fix: simple grammatcial changes * fix: PR review suggestions * fix: correct code block titles and update example inline jsx * Amberleys PR comments * feat: add mdx as a title to code blocks * add link to glossary for components to help disambiguate * Update docs/docs/mdx/index.md Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update docs/docs/mdx/index.md Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/data/sidebars/doc-links.yaml Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * local merge conflicts + github suggestions = confusion
Description
Clarifies and updates examples for the workflow of a new user adding components to their markdown content with MDX.
Main things changed:
Related Issues
Addresses #14258 as part of the effort of the 25 Workflows improvements