next-mdx-remote | Load mdx content from anywhere through getStaticProps | Frontend Framework library
kandi X-RAY | next-mdx-remote Summary
kandi X-RAY | next-mdx-remote Summary
Load mdx content from anywhere through getStaticProps in next.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of next-mdx-remote
next-mdx-remote Key Features
next-mdx-remote Examples and Code Snippets
Community Discussions
Trending Discussions on next-mdx-remote
QUESTION
I'm using next-mdx-remote to make use of MDX in my Next.js project.
I've been following JetBrains WebStorm guide to build this, here they've used bootstrap as their CSS but my choice of CSS framework was tailwind css.
The thing is when I install tailwind css or any other CSS based on tailwind css like flowbite, the MDX page loses it's styling.
Expected
What I Get after adding tailwind
- tailwind.config.js
ANSWER
Answered 2022-Jan-14 at 10:24You may change content
to purge
and add require('@tailwindcss/typography')
to plugins in tailwind.config.js
.
And then to see typography changes you should cover your with a
prose
named div.
- tailwind.config.js
QUESTION
I want to convert code returned by bundleMDX
to string for RSS reader I'm writing so I can use it with ReactDOMServer.renderToStaticMarkup(mdx)
like:
The Tailwind Blog above uses next-mdx-remote
where it works but I'm not sure how to do the similar thing in mdx-bundler
.
I've tried wrapping code in MDXLayoutRenderer
using mdxSource
:
ANSWER
Answered 2021-Sep-11 at 13:33Oopsie while making a repro, I again got this error:
'MDXProvider' refers to a value, but is being used as a type here. Did you mean 'typeof MDXProvider'?ts(2749)
This error is weird but as this file was small, I noticed the extension I had was .ts
but I was using JSX in the mdx
function.
So changed the extension to .tsx
& it worked. Was stuck on this weird problem for like 2-3 weeks.
QUESTION
I ran. while using Next.js.
...ANSWER
Answered 2021-Jun-24 at 16:24I found the same problem with node.js version 13.6.0. I changed to 14.17.0 and the problem is fixed as well.
QUESTION
I'm using next-mdx-remote
in mdx file
...ANSWER
Answered 2021-Jun-13 at 10:25Since you're using single back-tick code (inline code) you should use inlineCode
to target it. code
/pre
targets code blocks that use triple back-ticks.
QUESTION
I am making a blog with next-mdx-remote & want to use images in the .mdx
file outside of the public/
folder.
Here's the complete code of my blog project → https://github.com/deadcoder0904/blog-mdx-remote
I have the following folder structure:
...ANSWER
Answered 2020-Sep-18 at 14:17It's not possible unfortunately as next-mdx-remote
treats the markdown content as data & doesn't pass through Webpack at all :(
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install next-mdx-remote
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page