Getting Started with Next.js and Markdown
Welcome to my first blog post! This post demonstrates how to create a blog using Next.js with markdown support.
Code Examples
Here's some inline code: const greeting = "Hello World!"
And here's a code block:
javascript
function createGreeting(name) {
return `Hello, ${name}!`;
}
const message = createGreeting("World");
console.log(message);
TypeScript Example
typescript
interface User {
id: number;
name: string;
email: string;
}
const user: User = {
id: 1,
name: "John Doe",
email: "john@example.com"
};
CSS Example
css
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
.button {
background-color: #007bff;
color: white;
padding: 0.5rem 1rem;
border: none;
border-radius: 4px;
}
Bash Commands
bash
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
That's it! Now you have a working blog with markdown support and syntax highlighting.