Getting Started with next-md-blog
Learn how to set up and use next-md-blog in your Next.js project
Jane Smith1 min read91 words
tutorialguide
This guide will help you get started with the next-md-blog library.
Installation
First, install the library in your Next.js project:
npm install @next-md-blog/core
Initialization
Run the initialization command:
npx @next-md-blog/cli
This will:
- Create a
posts/folder - Set up the necessary routes
- Add an example blog post
Writing Blog Posts
- Create a new markdown file in the
posts/folder - Add frontmatter at the top of the file
- Write your content in markdown
Example:
---
title: "My First Post"
date: "2024-01-15"
description: "A description of my post"
---
# My First Post
Your content here...
Accessing Your Posts
- Individual post:
/blog/[slug] - All posts:
/blogs
That's it! You're ready to start blogging.