colburncodes / social

Social is a boilerplate that you can use for an unlimited number of projects. Whether you're trying to learn how to structure your own app or want to rapidly spin up a number of features, it sets you up with a powerful set of features.
https://staging.socialio.site/
5 stars 1 forks source link

Integrate ContentLayer with MDX in existing application #75

Closed colburncodes closed 5 months ago

colburncodes commented 8 months ago

As a developer, I want to integrate ContentLayer Docs and MDX Docs. So that I can manage content static content more efficiently and leverage MDXs capabilities for embedding JSX in markdown content.

Acceptance Criteria

  1. This is the documentation for the social site.
  2. Features, App, Marketing... (more to come).
  3. Creating a blog.

Resources

Next.js MDX

Installation

ContentLayer: npm install next-contentlayer

// next.config.js
import { withContentlayer } from 'next-contentlayer'
export default withContentlayer({})

Next.js npm install @next/mdx @mdx-js/loader @mdx-js/react @types/mdx

const withMDX = require('@next/mdx')()

/** @type {import('next').NextConfig} */
const nextConfig = {
  // Configure `pageExtensions` to include MDX files
  pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
  // Optionally, add any other Next.js config below
}

module.exports = withMDX(nextConfig)