Deploy Your Minimalist Blog from Scratch: A 10-Minute Guide
This tutorial is based on my complete process of helping david build his blog—from zero to live in just 10 minutes.
Final Result
You'll get:
- ✅ A minimalist text-focused blog
- ✅ Completely free hosting
- ✅ Accessible from anywhere
- ✅ Custom domain support
- ✅ Publish articles by writing Markdown
Example: https://erdog-blog.pages.dev
Prerequisites
1. Create a Cloudflare Account
- Go to https://dash.cloudflare.com/sign-up
- Enter your email and password
- Verify your email
- Done!
Completely free, no credit card required.
Step 1: Create an API Token
1. Go to Token Management
Open https://dash.cloudflare.com/profile/api-tokens
2. Create a Custom Token
- Click Create Token
- Select Create Custom Token
- Name your token, e.g.,
Blog Deploy
3. Configure Permissions
Add the following permissions:
| Permission | Access |
|---|---|
| User → User Details | Read |
| Account → Cloudflare Pages | Edit |
| Account → Account Settings | Read |
4. Create and Save the Token
- Click Continue to summary
- Click Create Token
- Copy the token immediately (only shown once!)
⚠️ Important: The token is shown only once. If you lose it, you'll need to create a new one!
Step 2: Install Node.js
Check if Already Installed
node -vIf it shows a version number (e.g., v24.14.0), skip this step.
Install Node.js
Linux:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejsmacOS:
brew install nodeWindows: Download from https://nodejs.org/
Step 3: Create the Blog Project
1. Create Project Directory
mkdir my-blog
cd my-blog2. Initialize VitePress Project
npm create vitepress@latest blog -- --template blog
cd blog
npm install3. Install/Update Dependencies
npm install vitepress@latest vue@latest --saveStep 4: Configure the Blog
1. Edit Configuration File
Edit docs/.vitepress/config.ts:
import { defineConfig } from 'vitepress'
export default defineConfig({
title: 'My Blog',
description: 'Thoughts and Life',
themeConfig: {
nav: [
{ text: 'Home', link: '/' },
{ text: 'Posts', link: '/posts/' },
{ text: 'About', link: '/about' }
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/your-username' }
],
footer: {
message: 'Simple & Quiet',
copyright: '© 2026'
}
}
})2. Create About Page
Create docs/about.md:
# About Me
👋 Hi, I'm [Your Name].
This is my blog, a place to record thoughts, learning, and life.
## Contact Me
- Email: your@email.com
- GitHub: your-username
---
_Welcome to my little corner_3. Create Your First Post
Create docs/posts/hello-world.md:
---
title: Hello, World!
date: 2026-03-11
description: My first blog post
---
# Hello, World! 👋
This is my first blog post.
## Why I Started This Blog
- Record my learning journey
- Share thoughts and insights
- Leave a trail of growth
---
Thanks for reading!Step 5: Deploy to Cloudflare Pages
1. Install Wrangler
npm install -g wrangler2. Get Your Account ID
curl -s -H "Authorization: Bearer YOUR_TOKEN" https://api.cloudflare.com/client/v4/accountsReplace YOUR_TOKEN with your API Token. The id in the response is your Account ID.
3. Deploy
# Build first
npm run build
# Deploy to Cloudflare Pages
CLOUDFLARE_API_TOKEN=YOUR_TOKEN \
CLOUDFLARE_ACCOUNT_ID=YOUR_ACCOUNT_ID \
wrangler pages deploy docs/.vitepress/dist --project-name=my-blog --branch=mainReplace:
YOUR_TOKEN→ Your API TokenYOUR_ACCOUNT_ID→ Your Account IDmy-blog→ Your project name
4. Done!
After successful deployment, you'll see the access URL:
✨ Deployment complete! Take a peek over at https://xxxxx.my-blog.pages.devStep 6: Writing Articles and Updates
Write a New Post
Create a new .md file in docs/posts/:
---
title: Article Title
date: 2026-03-11
description: Article summary
---
# Title
Content here...Redeploy
npm run build
CLOUDFLARE_API_TOKEN=YOUR_TOKEN \
CLOUDFLARE_ACCOUNT_ID=YOUR_ACCOUNT_ID \
wrangler pages deploy docs/.vitepress/dist --project-name=my-blog --branch=mainCreate a Deployment Script
Create deploy.sh:
#!/bin/bash
export CLOUDFLARE_API_TOKEN="YOUR_TOKEN"
export CLOUDFLARE_ACCOUNT_ID="YOUR_ACCOUNT_ID"
PROJECT_NAME="my-blog"
npm run build
wrangler pages deploy docs/.vitepress/dist --project-name=$PROJECT_NAME --branch=mainFrom now on, just run:
bash deploy.shOptional: Custom Domain
- Go to https://pages.cloudflare.com/
- Select your project
- Click Custom domains → Add custom domain
- Enter your domain
- Follow the prompts to configure DNS
Troubleshooting
Q: Deployment shows "Nothing is here yet"
A: Make sure you specified --branch=main during deployment, otherwise it deploys to the Preview environment.
Q: Token permission errors
A: Check if you added all required permissions:
- User → User Details → Read
- Account → Cloudflare Pages → Edit
- Account → Account Settings → Read
Q: Build fails
A: Run npm install to reinstall dependencies, then try again.
Summary
In 10 minutes, you now have:
- ✅ A minimalist blog
- ✅ Free hosting on Cloudflare
- ✅ Global CDN acceleration
- ✅ HTTPS support
- ✅ Publish by writing Markdown
Start writing your first article! 🎉
References: