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

  1. Create a new file in the
    content/posts/
    directory
  2. Name it with a slug (e.g.,
    my-awesome-post.md
    )
  3. Add frontmatter with your post metadata
  4. 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 code
    with backticks
  • Strikethrough with
    ~~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

  1. First item
  2. Second item
  3. Third item

Links and Images

Tables

Column 1Column 2Column 3
Row 1Data 1Data 2
Row 2Data 3Data 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

  1. Use descriptive slugs for filenames
  2. Include descriptions for better SEO
  3. Add relevant tags for categorization
  4. Use proper dates for chronological ordering
  5. Optimize images for web performance

Now you're ready to create amazing content! 📝