Skip to content

Build a Minimalist Blog with OpenClaw in 10 Minutes ​

This article documents my complete process of using OpenClaw to build a blog from scratch in 10 minutes. Just follow along, let the lobster do the work.

Live Demo: https://erdog-blog.pages.dev


The Core Idea ​

Traditional Way: Manual install → Manual config → Manual deploy (1-2 hours)

OpenClaw Way: Tell it what you want → It executes → You wait for results (10 minutes)


Step 1: Prepare Your Cloudflare Account (5 minutes) ​

1. Sign Up ​

Go to https://dash.cloudflare.com/sign-up

  • Enter email and password
  • Verify email
  • Done

Completely free, no credit card required.

2. Create an API Token ​

Open https://dash.cloudflare.com/profile/api-tokens

  1. Click Create Token
  2. Select Create Custom Token
  3. Name it Blog Deploy

3. Configure Permissions (Critical!) ​

Add these 3 permissions:

User → User Details → Read
Account → Cloudflare Pages → Edit
Account → Account Settings → Read

4. Get Your Account ID ​

After creating the token, run in terminal:

bash
curl -s -H "Authorization: Bearer Your_TOKEN" https://api.cloudflare.com/client/v4/accounts

The id in the response is your Account ID.

5. Save Two Critical Pieces of Info ​

API Token: KdlywkYvtBkZ-on0CJyyW7ZgyuA4W_cjxn-kMmVc (example)
Account ID: cd43a40e77fdc89831e31dcb632f57f6 (example)

⚠️ Token is shown only once. Copy it immediately!


Step 2: Let OpenClaw Build the Blog (5 minutes) ​

1. Open OpenClaw ​

Find OpenClaw in your chat interface (DingTalk/WeChat/Telegram/etc.).

2. Send the First Message ​

Help me build a minimalist blog with VitePress + Cloudflare Pages, accessible from anywhere.

My Cloudflare credentials:
API Token: [Your Token]
Account ID: [Your Account ID]
Blog Name: [Your Blog Name]

3. OpenClaw Will Automatically Execute ​

It will:

  • ✅ Create VitePress project
  • ✅ Install dependencies
  • ✅ Configure theme and styles
  • ✅ Create homepage, about page, sample posts
  • ✅ Build and deploy to Cloudflare Pages

You just wait for it to complete.

4. Get Your Access URL ​

After deployment, OpenClaw will give you the URL:

🎉 Deployment complete!

Access URL: https://your-blog.pages.dev

Step 3: Write Articles (1 minute/post) ​

Option 1: Let OpenClaw Write for You ​

Help me write a blog post titled "My First Article", about...

Option 2: Create Manually ​

Create a new file in docs/posts/:

bash
cat > docs/posts/my-article.md << 'EOF'
---
title: My Article Title
date: 2026-03-11
description: Article summary
---

# Title

Content here...
EOF

Deploy Updates ​

Help me deploy blog updates

Or run the deploy script:

bash
bash deploy.sh

Complete Conversation Example ​

Here's my actual conversation with OpenClaw:

Conversation 1: Create Blog ​

Me: Can you develop a blog website?

OpenClaw: Sure! Let me set up a static blog with VitePress...
(Automatically creates project, installs dependencies, configures theme)

Conversation 2: Deploy Live ​

Me: Deploy using option 2, make it minimalist text-focused like top blogs

OpenClaw: Got it! Minimalist text style, coming up!
(Automatically configures styles, builds, deploys to Cloudflare)

Conversation 3: Publish Article ​

Me: Publish this content to my blog, in English

OpenClaw: Alright! I'll translate this technical article to English and publish it.
(Automatically creates post, builds, deploys)

Total time: Less than 10 minutes.


Troubleshooting ​

Q: Deployment shows "Nothing is here yet" ​

A: Make sure --branch=main was specified during deployment. Ask OpenClaw to fix:

My blog shows "Nothing is here yet" after deployment, please fix

Q: Token permission errors ​

A: Recreate the token with these 3 permissions:

  • User → User Details → Read
  • Account → Cloudflare Pages → Edit
  • Account → Account Settings → Read

Q: Want to customize styles ​

A: Just tell OpenClaw:

Change my blog to dark mode / adjust fonts / add navigation

Q: Want to use custom domain ​

A:

  1. Go to Cloudflare Dashboard → Pages → Your Project → Custom domains
  2. Add your domain
  3. Follow DNS configuration prompts

Or ask OpenClaw for detailed steps.


Why Use OpenClaw? ​

Problems with Traditional Approach ​

  1. Reading Docs - VitePress docs + Cloudflare docs (1 hour)
  2. Debugging - Dependency conflicts, config errors, deployment failures (2-3 hours)
  3. Troubleshooting - Unknown errors, repeated attempts (1-2 hours)

Total: 4-6 hours

OpenClaw Approach ​

  1. Tell Requirements - 1 minute
  2. Wait for Execution - 5 minutes
  3. Get URL - 1 minute

Total: 7-10 minutes


Key Code/Configuration ​

Deploy Script (OpenClaw Creates This Automatically) ​

bash
#!/bin/bash
export CLOUDFLARE_API_TOKEN="Your_TOKEN"
export CLOUDFLARE_ACCOUNT_ID="Your_ACCOUNT_ID"
PROJECT_NAME="your-blog"

npm run build
wrangler pages deploy docs/.vitepress/dist --project-name=$PROJECT_NAME --branch=main

Configuration File (OpenClaw Configures This Automatically) ​

typescript
// docs/.vitepress/config.ts
import { defineConfig } from 'vitepress'

export default defineConfig({
  title: 'Your Blog Name',
  description: 'Blog Description',
  themeConfig: {
    nav: [
      { text: 'Home', link: '/' },
      { text: 'Posts', link: '/posts/' },
      { text: 'About', link: '/about' }
    ]
  }
})

Summary ​

What You Need to Do ​

  1. Sign up for Cloudflare (5 minutes)
  2. Create API Token (2 minutes)
  3. Tell OpenClaw your requirements (1 minute)
  4. Wait for completion (5 minutes)

Total: About 13 minutes

What OpenClaw Does ​

  • ✅ Create project structure
  • ✅ Install all dependencies
  • ✅ Configure theme and styles
  • ✅ Create sample content
  • ✅ Build and deploy
  • ✅ Create deployment script

What You Get ​

  • A live blog
  • Complete source code
  • One-click deploy script
  • Ongoing update support

Get started! Open your OpenClaw and send the first message:

Help me build a minimalist blog with VitePress + Cloudflare Pages.

My Cloudflare credentials:
API Token: [Your Token]
Account ID: [Your Account ID]

In 10 minutes, you'll have a live blog. 🎉


References:

有想法?给我发邮件 cnyfdr@gmail.com