Blog posts on this demo use .mdx pages for the blog posts and are set up to allow Snippets amongst the body content on those pages.
@next/mdx does not support frontmatter by default, but we use next-mdx-remote to allow it in this demo, and also support the importing of components to use as Snippets.
Most of the logic for this lives in pages/blog/[slug].jsx, and an example Snippet lives on the page content/posts/email-delivery-tips.mdx.
- Add the snippet to the
cloudcannon.config.yamlfollowing the format of the placeholder ones - Add the snippet import to
pages/blog/[slug].jsx, and add it to thecomponentsobject, which passes it to themdxpages in the blog section to be used.
Sendit is built with Next.js (version 13.0.4).
$ npm install
$ npm run dev