rsnext/examples/app-dir-mdx
Alexander Bluhm 5ccf71a418
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.
2023-05-13 20:12:13 +00:00
..
app Add mdx page example to examples/app-dir-mdx (#47082) 2023-05-13 20:12:13 +00:00
public Add support for rendering MDX as a server component (#44651) 2023-01-06 13:09:05 -08:00
types Add support for rendering MDX as a server component (#44651) 2023-01-06 13:09:05 -08:00
.gitignore Remove incorrect entries for pnpm debug log (#47241) 2023-03-26 22:26:05 -07:00
mdx-components.tsx Add MDXComponents type to useMDXComponents (#45737) 2023-02-14 16:41:49 -08:00
next-env.d.ts Remove incorrect entries for pnpm debug log (#47241) 2023-03-26 22:26:05 -07:00
next.config.js Add mdx page example to examples/app-dir-mdx (#47082) 2023-05-13 20:12:13 +00:00
package.json Change @next/font to next/font in examples (#46836) 2023-03-06 21:01:13 +00:00
README.md Add support for rendering MDX as a server component (#44651) 2023-01-06 13:09:05 -08:00
tsconfig.json Add support for rendering MDX as a server component (#44651) 2023-01-06 13:09:05 -08:00

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.