Indie Kit DocsIndie Kit Docs
Tutorials

Create Blog Post

Learn how to create and manage blog posts in your Indie Kit website

Creating Blog Posts 📝

Indie Kit comes with a built-in blog system that supports MDX, tags, featured images, and automatic routing. Let's learn how to create beautiful blog posts! ✨

Quick Start 🚀

  1. Rename the sample blog post file from:

    src/content/blog/add-button-to-any-website.mdx.donotuse

    to:

    src/content/blog/add-button-to-any-website.mdx
  2. Your blog will automatically appear at /blog/add-button-to-any-website!

Blog Post Structure 📄

Each blog post is an MDX file with frontmatter metadata. Here's the structure:

---
title: Your Blog Title
tags: ["tag1", "tag2", "tag3"]
featuredImage: '/assets/images/your-image.png'
createdDate: '2024-03-20'
description: 'A brief description of your blog post'
---
 
# Your Content Here
 
Write your blog content using Markdown and MDX!

Frontmatter Fields 📋

  • title: The title of your blog post
  • tags: Array of tags for categorizing your post
  • featuredImage: Path to the featured image (stored in public directory)
  • createdDate: Publication date (YYYY-MM-DD format)
  • description: Brief description for SEO and previews

Writing Content ✍️

Your blog posts support:

  • 📝 Full Markdown syntax
  • 🎨 MDX components
  • 📊 Code blocks with syntax highlighting
  • 🖼️ Images and media
  • 📑 Automatic table of contents
  • 🔗 Internal and external links

Example Content Structure

# Main Title
 
## Section 1
Content for section 1...
 
### Subsection 1.1
More detailed content...
 
## Section 2
Another section with content...

Best Practices 💡

  1. Images

    • Store images in public/assets/images/
    • Use descriptive file names
    • Optimize images for web
  2. Tags

    • Use relevant, consistent tags
    • Keep tags lowercase
    • Use hyphen for multi-word tags
  3. SEO

    • Write descriptive titles
    • Include meaningful descriptions
    • Use relevant tags
    • Add alt text to images

Viewing Your Blog 👀

  • Individual posts: /blog/[slug]
  • Blog listing: /blog
  • Tags are automatically grouped
  • Featured images appear in previews

The blog system will automatically:

  • Generate SEO metadata
  • Create a table of contents
  • Handle routing
  • Show related posts
  • Enable social sharing

Now you're ready to start blogging! Create engaging content and share it with your audience! 🚀

On this page