Using MDX for writing and managing content for a documentation site provides flexibility if you are deep into the β€œdocs-as-code” workflow. This flexibility allows you to mix Markdown with React components, use dynamic data and stitch them together at runtime.

However, this flexibility also comes with challenges. MDX files often contain components that render content at runtime and these components are not included in the raw Markdown output:

  • Scene/custom components that load wizard steps or reusable content from separate files
  • Schema-driven tables that read JSON configurations
  • API documentation generated from TypeDoc/JSDoc output
  • Embedded code blocks and media content components

Using raw .mdx files on their own to add a feature such as a β€œcopy as markdown” button on each…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help