Getting Started with Next.js and MDX
Welcome to my first blog post! This post demonstrates how to create a blog using Next.js and MDX.
What is MDX?
MDX is a powerful format that lets you use JSX directly in your markdown files. This means you can:
- Write markdown content
- Embed React components
- Create interactive documentation
- Build rich blog experiences
Code Example
Here's a simple React component:
jsx
import { useState } from "react";
function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>Click me</button>
</div>
);
}Features
Some awesome features of this setup:
- TypeScript support - Full type safety
- Syntax highlighting - Beautiful code blocks
- Fast refresh - Instant development feedback
- SEO optimized - Perfect for blog content
This is a blockquote to show some variety in the content.
Conclusion
MDX provides an excellent way to create rich, interactive content for your blog. Happy coding!
| Task | Command |
|---|---|
| List users | cut -d: -f1 /etc/passwd |
| List groups | cut -d: -f1 /etc/group |
| User info | id username |
| Group members | getent group groupname |
| Login history | last username |
| Current user | whoami |
| Switch user | su - username |
| Sudo access | sudo -l |