Skip to content

Setup Git-Based Blog

This guide shows you how to connect a Git repository for blog content. It assumes you’re comfortable with Git and version control.

  • Git repository (GitHub, GitLab, Bitbucket, or self-hosted)
  • Repository containing MDX files in a posts/ directory
  • Access credentials (SSH key or access token for private repos)

Your repository should follow this layout:

your-repo/
├── posts/ # MDX blog posts
│ ├── post-1.mdx
│ └── post-2.mdx
└── assets/
└── images/ # Post images
  1. Git Repository URL — Enter your repository URL

    • HTTPS: https://github.com/your-org/blog-content.git
    • SSH: git@github.com:your-org/blog-content.git
  2. Branch — Specify the branch to sync from (usually main)

  3. Content Path — Directory containing posts (default: posts)

  4. Enable Content Sync — Toggle on to enable automatic syncing during builds

No authentication needed. Use the HTTPS URL and leave authentication fields empty.

  1. Click Save to store your configuration

  2. Click Sync Now to test the connection

  3. Check the sync status:

    • Success: Shows last synced time and commit hash
    • Error: Review error message and fix authentication/URL issues

Content syncs at these times:

  • Manual: Click “Sync Now” in the admin panel
  • Automatic: During each site build/deploy
  • Scheduled: Daily sync (if enabled in platform settings)
  • Verify token/key has read access
  • Check if token has expired
  • Confirm repository URL is correct
  • For SSH, ensure private key matches public key added to repo
  • Confirm branch name exists (check for main vs master)
  • Verify spelling and case sensitivity
  • Ensure MDX files are in the configured content path
  • Verify files have .mdx extension (not .md)
  • Check frontmatter syntax is valid YAML

Posts must have:

  • title field
  • date field in YYYY-MM-DD format

Optional but recommended:

  • description for SEO
  • author for attribution
  • image for featured image
  • tags for categorization

Use meaningful commit messages — Help your team understand content changes

Test in staging branch — Preview changes before publishing to main

Optimize images before committing — Compress to < 200KB for faster loading

Regular syncs — Manually sync after pushing changes to see them reflected quickly

Monitor sync status — Check the admin panel for warnings about missing frontmatter or sync errors