MDX is an authorable format that lets users write JSX in markdown documents.
Questions tagged [mdxjs]
153 questions
2
votes
1 answer
Is it possible to load a file from remote URL (non JS) to be used in WebPack build
I am attempting to load a file from a remote URL during build to be WebPacked. This file is an MDX file and I am using the MDX vue-loader to load this file for use within the Vue application.
The system I am deploying is tenanted with a headless CMS…

Gerard Wilkinson
- 1,512
- 14
- 33
2
votes
1 answer
How to turn off text-shadow in a PrismJS CSS theme?
I'm trying to format a code block in Gatsby with Prism.js, but the built-in CSS that I import adds a text-shadow that makes it look awful:
When I toggle off the text-shadow in Chrome DevTools, it looks great:
However, I can't figure out how to do…

James Shapiro
- 4,805
- 3
- 31
- 46
2
votes
2 answers
Markdown is not being displayed correctly due to CSSReset - Chakra-ui
I'm making a NextJs Blog, and I have to render my markdown in a dynamic page. CSSReset is being used in my app, and as a consequence, markdown is not being displayed correctly. Can someone help me out on this??
my ThemeContainer
0 import React from…

gabriel_tiso
- 1,007
- 3
- 11
- 27
2
votes
2 answers
How to make a stories.mdx file in Storybook?
I would like to add documentation alongside my components in Storybook thanks to markdown syntax. I've followed Storybook's guidelines, but when launching the app, I receive the following error in my terminal:
FATAL ERROR: CALL_AND_RETRY_LAST…

DoneDeal0
- 5,273
- 13
- 55
- 114
2
votes
1 answer
How to include markdown file (md) inside mdx file
plain.md
# plain markdown
some.mdx
# some mdx file
include './plain.md'
Result file
# some mdx file
# plain markdown
How to do something like this with mdxjs?

Maksim Nesterenko
- 5,661
- 11
- 57
- 91
2
votes
1 answer
Enable auto (self)-closing tags for JSX in MDX file
I am moving a website to Gatsby. For article posts, the original source was written as HTML files. I want to take advantage of using MDX for those content. However, copy-paste tons of articles from HTML to MDX produce much pain. Particularly, MDX…

Binh
- 346
- 2
- 14
1
vote
0 answers
Possible to customize the remarkGFM MDX generated `id` attribute on footnotes?
Right now my footnotes citation links as #user-content-fnref-, so if I do [^foo] it will be #user-content-fnref-foo. How can I change it so it is a bit cleaner looking in the URL, so maybe it is just #foo or #cite:foo or…

Lance
- 75,200
- 93
- 289
- 503
1
vote
1 answer
Custom components in Markdown / MDX on Astro
I would like to be able to replace the default code that Astro uses to render some Markdown elements.
For example, it would be nice that when I type :
Some Text

---
Some other text
I could get
Some Text

TOOL
- 70
- 1
- 10
1
vote
1 answer
Nextjs App Directory: MDX & Link doesn't work properly with relative links
I asked this question in the Next.js Github Issues, but didn't get any answer.
I copied the code from next.js/examples/app-dir-mdx. in the following codeSandbox - the only additional change I made was:
create a new markdown file in…

Gangula
- 5,193
- 4
- 30
- 59
1
vote
0 answers
How can I compile MDX2 to static HTML with components
I'm trying to write an MDX2-to-HTML compiler. I've got most of it working (that is, I can compile a simple .mdx file to HTML), but without importable components.
I have read through the entire MDX2 website, but it's not quite clicking for me. I…

Sir Robert
- 4,686
- 7
- 41
- 57
1
vote
1 answer
Using MDX with NextJS 13 returning useContext error
I'm trying to use mdx files in Next.js 13. I've already done all the necessary configuration in next.config and created the file.
Inside the app folder, I have > docs > components > accordion > page.mdx
The page file only renders a title like "#…

Felipe Gouvêa
- 95
- 9
1
vote
0 answers
Possible to embed css classes into MDX document?
Is it possible to embed css class styling into a MDX document? I cannot find any information on it anywhere.

basickarl
- 37,187
- 64
- 214
- 335
1
vote
1 answer
Astrojs: How can I get a component to appear as inline text in an MDX file?
Question:
In the screenshot below, I want the first line to appear exactly as the second line. Is there a way to do this in Astrojs?
Here is my full reproduction on Codesandbox.
Here is what the output looks like (see below). Notice how the period…

Jesse Good
- 50,901
- 14
- 124
- 166
1
vote
0 answers
React composite components cause linting error in mdxjs
I am writing some documentation in .mdx (mdxjs) using Storybook js for a React composite component.
When I import the component into the mdx file and try to reference the composite child the linter ("eslint-plugin-mdx": "^2.0.5") complains it is…

alasdair009
- 95
- 9
1
vote
2 answers
Remix: Generate links to all routes programatically
I'm a creating a blog using Remix.
Remix supports MDX as a route, which is perfect for me, as I can just write my blog posts as .mdx files and they'll naturally become routes.
However, if you access the index route - I would like to display the list…

dwjohnston
- 11,163
- 32
- 99
- 194