# Navigate to your blog directory
cd /Users/sidneyswift/Documents/GitHub/Recoupable/Recoup-Product/recoup-blog
# Stage all files
git add .
# Create initial commit
git commit -m "Initial commit: Recoupable Research blog"
# Create GitHub repository (using gh CLI if you have it)
gh repo create Recoupable/recoup-blog --public --source=. --remote=origin --push
# Or manually:
# 1. Go to https://github.com/new
# 2. Create repo named "recoup-blog"
# 3. Then run:
git remote add origin git@github.com:Recoupable/recoup-blog.git
git branch -M main
git push -u origin main# Install Vercel CLI if you don't have it
pnpm add -g vercel
# Deploy
vercel
# Follow prompts:
# - Link to existing project? No
# - Project name? recoup-blog
# - Which directory? ./ (press enter)
# - Override settings? No
# Deploy to production
vercel --prod- Go to https://vercel.com/new
- Import your
Recoupable/recoup-blogrepository - Configure project:
- Framework Preset: Next.js (auto-detected)
- Root Directory:
./ - Build Command:
pnpm run build - Install Command:
pnpm install
- Click "Deploy"
- In Vercel dashboard → Project Settings → Domains
- Add domain:
- Option 1:
research.recoupable.com - Option 2:
blog.recoupable.com
- Option 1:
- Add DNS records (Vercel will show you what to add):
Type: CNAME Name: research (or blog) Value: cname.vercel-dns.com - Wait for DNS propagation (~5-30 minutes)
Once deployed, publishing is simple:
# 1. Write your post
cd content/blog
# Create new-post.mdx with frontmatter
# 2. Test locally
pnpm dev
# Visit http://localhost:3000
# 3. Commit and push
git add content/blog/new-post.mdx
git commit -m "Add post: Your Post Title"
git push
# 4. Auto-deploys to Vercel in ~2 minutes!No environment variables are required for basic operation.
Future integrations might need:
RESEND_API_KEY- for email newsletterSUPABASE_URL/SUPABASE_ANON_KEY- for social posting automationDATABASE_URL- for comments or analytics
For research.recoupable.com:
Type: CNAME
Name: research
Value: cname.vercel-dns.com
TTL: Auto
- Vercel automatically provisions SSL certificates
- HTTPS will be enforced
- Certificate auto-renews
Enable in project settings:
- Web Analytics
- Speed Insights
Add Google Analytics / Plausible / Fathom:
- Create
app/layout.tsxscript tag:
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"
></script>Once set up:
- Automatic: Push to
main→ auto-deploy to production - Preview: Push to feature branch → get preview URL
- Rollback: Vercel dashboard → Deployments → click previous → "Promote to Production"
# Build locally to catch errors
pnpm build
# Test production build
pnpm start
# Or use Vercel preview
git checkout -b preview/test-post
git push -u origin preview/test-post
# Vercel creates preview URLTo auto-post to social media when publishing:
- Set up Supabase table to store published posts
- Create API route
/api/publishthat:- Saves post to database
- Calls Twitter/LinkedIn APIs
- Generates social cards
- Add webhook in Vercel to trigger on deploy
Example flow:
Push to GitHub → Vercel Deploy → Webhook → API Route → Social Posts
Check Vercel logs:
- Vercel Dashboard → Project → Deployments
- Click failed deployment
- View "Building" logs
Common issues:
- Missing dependencies:
pnpm installlocally - TypeScript errors:
pnpm buildlocally - MDX syntax errors: Check backticks in code blocks
- Verify DNS propagation: https://dnschecker.org
- Check Vercel domain status (should be green checkmark)
- Wait 30 minutes for full propagation
- Store images in
/public/blog/ - Reference as
/blog/image.jpgin markdown - Or use external URLs (imgur, cloudinary)
- Vercel Docs: https://vercel.com/docs
- Next.js Docs: https://nextjs.org/docs
- Contentlayer Docs: https://contentlayer.dev
You're all set! Your blog is now live and ready for content. 🎉