CS
Chirag Singhal

CMS Guide - How to Create & Edit Blog Posts

Method 1: Via Decap CMS (Recommended for Non-Technical Users)

Accessing the CMS

  1. Navigate to https://blog.oriz.in/admin
  2. Click "Login with GitHub"
  3. Authorize the Decap CMS app if prompted
  4. You'll see the CMS dashboard

Creating a New Post

  1. Click "Blog Posts" in the left sidebar
  2. Click "New Blog Posts" button
  3. Fill in the fields:
    • Title: Your post title
    • Description: A short summary (used in meta tags and previews)
    • Publish Date: When the post should appear
    • Tags: Add relevant tags (press Enter after each)
    • Category: e.g., "Tutorials", "Development", "Personal"
    • Draft: Check this to save without publishing
    • Body: Write your content in Markdown/MDX
  4. Click "Publish" or "Save as Draft"
  5. The CMS commits to GitHub → Cloudflare auto-deploys

Editing an Existing Post

  1. Click "Blog Posts" in the sidebar
  2. Click the post you want to edit
  3. Make changes
  4. Click "Publish"

Uploading Images

  1. Use the image widget in the CMS
  2. Images are saved to public/images/uploads/
  3. Reference them in your post as /images/uploads/filename.jpg

Method 2: Via Git Repository (For Developers)

File Location

All blog posts live in: src/content/blog/

Creating a New Post

  1. Create a new .mdx file in src/content/blog/
  2. Filename becomes the URL slug: my-post.mdx/blog/my-post
  3. Add frontmatter:
    ---
    title: "Your Post Title"
    description: "A short description of your post"
    pubDate: 2026-03-24
    tags: ["Tag1", "Tag2"]
    category: "General"
    draft: false
    author: "Chirag Singhal"
    ---
  4. Write your content below the frontmatter using MDX (Markdown + JSX)
  5. Commit and push → Cloudflare auto-deploys

MDX Tips

  • Use # Heading for h1, ## Heading for h2, etc.
  • Use backtick fences for code blocks with language hints
  • Import components: import MyComponent from '../../components/MyComponent.astro'
  • Add images: ![Alt text](/images/uploads/image.jpg)

Post Guidelines

  • Always include a description (150-160 chars for SEO)
  • Use 3-5 relevant tags
  • Choose one category
  • Add a heroImage if possible
  • Keep titles under 60 characters