rsnext/examples/with-mdx-remote/posts/example-post.mdx
Daniel Eden a2d83952c1
Add with-mdx-remote example (#16613)
This change adds a new example, `with-mdx-remote`, which leverages [`next-mdx-remote`](https://github.com/hashicorp/next-mdx-remote) to use MDX files as content for a dynamic route.

In addition to the basic functionality, the example adds a note about somewhat advanced usage that allows the use of conditionally-loaded custom MDX components.

cc @jescalan
2020-08-29 01:22:35 +00:00

12 lines
421 B
Text

---
title: Example Post
description: This frontmatter description will appear below the title
---
This is an example post, with a [link](https://nextjs.org) and a React component:
<TestComponent name="next-mdx-remote" />
The title and description are pulled from the MDX file and processed using `gray-matter`. Additionally, links are rendered using a custom component passed to `next-mdx-remote`.
Go back [home](/).