Unverified Commit 5ccf71a4 authored by Alexander Bluhm's avatar Alexander Bluhm Committed by GitHub

Add mdx page example to examples/app-dir-mdx (#47082)

This PR affects the `examples/app-dir-mdx` project.

Currently, only an example of importing a `.mdx` file (`message.mdx`) into the `page.tsx` file is shown.
However, a more common example would be using a `.mdx` file as a page, e.g., in a blog scenario.
I added an example for this, enabled the page extension to allow `.mdx` pages, and changed the body's height, which is a cosmetic change for the newly created blog page.
parent 33237020
# Hello World
This is an example blog page with MDX support.
...@@ -83,6 +83,7 @@ html, ...@@ -83,6 +83,7 @@ html,
body { body {
max-width: 100vw; max-width: 100vw;
overflow-x: hidden; overflow-x: hidden;
height: 100%;
} }
body { body {
......
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
experimental: { experimental: {
appDir: true, appDir: true,
mdxRs: true, mdxRs: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment