can we use mdx as te content file, let's make UI more attractive and simple
I'll convert the content to MDX format and create a more attractive, modern UI design with better visual elements.
Perfect! I've transformed the app with MDX content support and a much more attractive, modern UI design. Here are the key improvements:
<InfoBox title="Title">Content</InfoBox> - Blue info callouts<TipBox title="Title">Content</TipBox> - Yellow tip callouts<WarningBox title="Title">Content</WarningBox> - Red warning callouts<CodeExample language="python" title="Title">Code</CodeExample> - Enhanced code blocksThe app now has a modern, professional appearance that's both visually appealing and highly functional, with rich MDX content that makes learning more engaging!
The code returns the following error:
The "astring" module does not provide an export named "GENERATOR".
Revise the code to address the error.
I was previewing: /tutorial/python/lesson/1
The error appears because serialize (from next-mdx-remote/serialize) was executed in a client component.serialize brings in a Node-only dependency chain (ending in the astring package); bundling that code for the browser causes the missing‐export error you saw.
Fix:
Below are the required changes and the new files.
That’s it—serialisation now runs only on the server, eliminating the browser-side astring problem.