Skip to content

πŸ“ CG Blog: React blog with RTL support. Host content anywhere. Vite + SSR. Beginner-friendly MD setup.

Notifications You must be signed in to change notification settings

Creative-Geek/CG-Blog

Repository files navigation

CG Blog 🎨

image

Minimalist React blog engine with first-class RTL support. Your content, any hosting, no lock-in.

License: MIT

Features

πŸ” Auto RTL Article switching (Arabic/Urdu/Persian ready)
🌐 Server-side rendering (React Router 7)
πŸ“‘ Remote markdown content from any URL
♾️ Infinite scroll with loading states
πŸ–ΌοΈ Graceful fallbacks for missing data
πŸŒ— Built-in dark mode (Shadcn/ui)

Get Started in 3 Steps

  1. Clone:
git clone https://github.com/Creative-Geek/cg-blog.git
  1. Set content source in src/constants.js:
// Use GitHub raw URLs, CMS API, or your own server
export const BASE_URL = "YOUR_MARKDOWN_FILES_URL";
  1. Launch:
npm install && npm run dev

Content Structure Template

Content Server/
β”œβ”€β”€ Articles
β”‚   β”œβ”€β”€ my-post.md     # Body content
β”‚   β”œβ”€β”€ my-post.json   # { "title": "...", "date": "2025-01-01", ... }
β”‚   └── my-post.jpg    # Optional cover
└── Pages
    β”œβ”€β”€ about.md       # Static page content
    └── about.json     # { "title": "About Me" }

Hosting Strategies

Dynamic Mode (Recommended)

  • Frontend: Deploy to Netlify/Vercel
  • Content: Host MD files on GitHub/S3/Cloudflare
    Edits appear live without redeploys

Static Mode

  • Place content in /public folder
  • Build with npm run build
    Requires rebuild on content changes

Configuration Guide

  • RTL Support: Set "dir": "rtl" in article JSON
  • SEO: Edit sitemap-generator.js
  • Styling: Modify tailwind.config.js
  • Empty States: Customize src/components/placeholder

Why CG Blog?

  • πŸ•‹ Providing real RTL support to markdown content.
  • πŸš€ Content lives separately - no CMS wars
  • 🧩 Tested with 100+ articles (stress-free scroll)
# Rebuild search index when adding content
node generate-index.js

Contribute

Help us improve:

  • Add content migration guides
  • Enhance image lazy-loading
  • Develop Git-based CMS adapter

License: MIT

Releases

No releases published

Languages