By Punten Team2 min read311 words
How to Create Posts
Tutorial
tutorial
markdown
guide
How to Create Posts
Learn how to create and manage your blog posts using markdown files with frontmatter.
Creating a New Post
- Create a new file in the content/posts/directory
- Name it with a slug (e.g., my-awesome-post.md)
- Add frontmatter with your post metadata
- Write your content in markdown below the frontmatter
Frontmatter Fields
The frontmatter section contains metadata about your post:
Required Fields
- title: The title of your post
- date: Publication date in YYYY-MM-DD format
Optional Fields
- author: Author name
- description: Meta description for SEO
- tags: Array of tags (e.g.,["react", "javascript"])
- category: Post category
- coverImage: Path to cover image
Example Frontmatter
--- title: "My Awesome Post" date: "2024-12-30" author: "John Doe" description: "This is an awesome post about awesome things" tags: ["awesome", "blog"] category: "Tutorial" coverImage: "/images/awesome-post.jpg" ---
Markdown Features
Text Formatting
- Bold text with **bold**
- Italic text with *italic*
- Inline codewith backticks
Strikethroughwith~~text~~
Code Blocks
function hello() { console.log("Hello, world!"); }
Lists
Unordered Lists
- Item 1
- Item 2
- Nested item
- Another nested item
- Item 3
Ordered Lists
- First item
- Second item
- Third item
Links and Images
Tables
| Column 1 | Column 2 | Column 3 |
|---|---|---|
| Row 1 | Data 1 | Data 2 |
| Row 2 | Data 3 | Data 4 |
Blockquotes
This is a blockquote
It can span multiple lines
File Organization
Organize your posts in the
content/posts/
directory:
content/ └── posts/ ├── welcome-to-punten-blog.md ├── how-to-create-posts.md ├── my-first-post.md └── advanced-tutorial.md
Best Practices
- Use descriptive slugs for filenames
- Include descriptions for better SEO
- Add relevant tags for categorization
- Use proper dates for chronological ordering
- Optimize images for web performance
Now you're ready to create amazing content! 📝
