Contentlayer is used to create an MDX compatible blog. It allows you to easily write blogs to boost your SEO.

Writing blogs

You’ll find an example using various MDX components already present in the /blogs folder.

Everything is already set up, so you can start writing your blogs immediately:

  1. Create a new .mdx file in the folder /blog
  2. Include the following metadata at the top of the file
    ---
    title: Your Title
    subtitle: "Your Description"
    date: 2024-04-28
    image: "your_image_url"
    ---
    
  3. Start writing your blog!

Structure

  • app/blog/*: front-end logic
  • /blog/*/ your articles go here
  • components/blog/*: MDX components used
  • contentlayer.config.ts: contentlayer config file