MDX in Next.js is Easy Now

  Рет қаралды 5,193

Colby Fayock

Colby Fayock

Күн бұрын

Пікірлер: 17
@colbyfayock
@colbyfayock 2 ай бұрын
Learn how to build a full stack Next.js app in my upcoming course: colbyfayock.com/course
@isaito77
@isaito77 2 ай бұрын
Dude you're a wizard. I spent nearly 12 hours today trying to get this exact functionality with mdx files typed up and with this video I can now go to sleep. Cheers !!!!
@colbyfayock
@colbyfayock 2 ай бұрын
glad i was able to help!! 🙌😁
@ibnurasikh
@ibnurasikh 2 ай бұрын
Very good video! My question is, do I need to rebuild every time new content is added or updated in MDX? I come from WordPress, where content can be published with just one click. Can this be achieved with MDX and Next.js, or do I still need to rebuild or redeploy?
@jengkhaw15
@jengkhaw15 2 ай бұрын
Since this is reading from fs, you would need to redeploy for updates. Just store your mdx (or whatever content) in a database and access it from nextjs if you want dynamic content.
@shreyashraj
@shreyashraj 2 ай бұрын
yes it will. If you don't want that you can use a database with markdowns but then power of jsx will be missing
@lostinthenarrativve
@lostinthenarrativve 21 күн бұрын
As soon as I try to install the dependencies I get loads and loads of configuration errors .
@RabahTaib-mn4fs
@RabahTaib-mn4fs 2 ай бұрын
How do you get code highlighting for mdx files?
@colbyfayock
@colbyfayock 2 ай бұрын
for that you typically can use processing tools such as remark which is a popular one, for instance: github.com/rehypejs/rehype-highlight i have a tutorial that walks through something similar but in HTML and a different use case: kzbin.info/www/bejne/gnexfqZunqqajq8 haven't used this but shiki is popular: shiki.style/packages/markdown-it#usage here's the official mdx page on options: mdxjs.com/guides/syntax-highlighting/ though seems like its a bit dated
@immipixediter210
@immipixediter210 2 ай бұрын
Source Code or Example *.mdx files needed
@alireza1642
@alireza1642 2 ай бұрын
Why not using contentlayer?
@colbyfayock
@colbyfayock 2 ай бұрын
first i heard of it! maybe that'll be an upcoming vidoe "MDX is Even Easier Now" 🙃
@rtorcato
@rtorcato 2 ай бұрын
content layer is no longer maintained. There is a new package called velite
@colbyfayock
@colbyfayock 2 ай бұрын
@@rtorcato ah good to know, will check that one out then
@marwen_dev
@marwen_dev 2 ай бұрын
Yeah contentlayer is no longer maintained but contentlayer2 is lol😅. It works great 👍 just install contentlayer2 and follow the docs of contentlayer.
@saadh393
@saadh393 2 ай бұрын
Best
@colbyfayock
@colbyfayock 2 ай бұрын
🙌
Lint & Format JavaScript with Biome
23:20
Colby Fayock
Рет қаралды 6 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,5 МЛН
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 89 МЛН
This Game Is Wild...
00:19
MrBeast
Рет қаралды 138 МЛН
AWS CEO - The End Of Programmers Is Near
28:08
ThePrimeTime
Рет қаралды 548 М.
Favicons the Right Way
18:07
Colby Fayock
Рет қаралды 11 М.
The Big Headless CMS Lie (James Mikrut)
18:14
Vercel
Рет қаралды 69 М.
Create your own Next.js Starter Template
2:35:29
Syntax
Рет қаралды 35 М.
Self-Hosting Next.js
45:13
leerob
Рет қаралды 68 М.
Bye, WordPress
54:33
Colby Fayock
Рет қаралды 3,1 М.
This Folder Structure Makes Me 100% More Productive
24:36
Web Dev Simplified
Рет қаралды 93 М.
Learn NEXT.JS 14 🔥 Build a Static Markdown Blog Site
37:14
Smoljames
Рет қаралды 14 М.
The M4 Mac Mini is Incredible!
11:45
Marques Brownlee
Рет қаралды 5 МЛН
Не бойтесь экраны "водопады"
1:00
Бананикс
Рет қаралды 409 М.
Андроид - мечта геймера!😍
1:00
Корнеич
Рет қаралды 1,3 МЛН
Как подключить магнитолу?
0:51
KS Customs
Рет қаралды 2,1 МЛН