RevCraze

Untitled

By RevCraze Team

2 min read

Blog Content Guide

This directory contains markdown files for blog posts. Each blog post should be a .md file with frontmatter metadata.

File Structure

content/
  blogs/
    your-blog-post-slug.md

Frontmatter Format

Each blog post should start with YAML frontmatter containing metadata:

---
title: "Your Blog Post Title"
excerpt: "A brief description of the blog post (150-200 characters recommended)"
date: "2024-01-15"  # ISO format: YYYY-MM-DD
author: "Author Name"
featuredImage: "/images/blog/your-image.jpg"  # Optional: path to featured image
tags: ["tag1", "tag2", "tag3"]  # Optional: array of tags
updatedAt: "2024-01-20"  # Optional: last update date
---

Required Fields

  • title: The blog post title
  • excerpt: Brief description (used in listings and meta descriptions)
  • date: Publication date in YYYY-MM-DD format

Optional Fields

  • author: Author name (defaults to "RevCraze Team")
  • featuredImage: Path to featured image (relative to public folder)
  • tags: Array of tags for categorization
  • updatedAt: Last update date
  • readingTime: Reading time in minutes (auto-calculated if not provided)

Markdown Content

After the frontmatter, write your blog post content using standard Markdown syntax:

  • Headers: # H1, ## H2, ### H3
  • Bold text: **bold**
  • Italic text: *italic*
  • Lists: - item or 1. item
  • Links: [text](url)
  • Images: ![alt text](image-url)
  • Code blocks: Use triple backticks

Example

See sample-blog-post.md for a complete example.

Image Optimization

  • Place images in the public/images/blog/ directory
  • Use descriptive filenames
  • Optimize images before uploading (recommended: WebP format, max 1200px width)
  • Reference images with paths like /images/blog/your-image.jpg

SEO Best Practices

  1. Title: Make it descriptive and keyword-rich (50-60 characters)
  2. Excerpt: Write compelling descriptions (150-160 characters)
  3. Content: Use proper heading hierarchy (H1 → H2 → H3)
  4. Images: Always include alt text for images
  5. Tags: Use relevant tags for better categorization

API Integration

The blog system also supports fetching posts from your backend API at: https://evdekho-backend-7f6f8ecf5616.herokuapp.com/api/v1/blogs

If you prefer to manage blogs through an API instead of markdown files, ensure your API returns posts in this format:

{
  "slug": "blog-post-slug",
  "title": "Blog Post Title",
  "excerpt": "Brief description",
  "content": "Full markdown or HTML content",
  "date": "2024-01-15",
  "author": "Author Name",
  "featuredImage": "https://example.com/image.jpg",
  "tags": ["tag1", "tag2"]
}

The system will automatically try the API first, then fall back to local markdown files.