Cloudflare Native

The Ultimate Cloudflare-Native Blog Scaffold

Deploy a fast personal blog or developer journal on Cloudflare. Use Hexo/NexT for static output, Workers for authenticated admin APIs, D1 for metadata, and R2 for media assets.

blog.xhalo.co
# Clone and validate the framework
$ git clone https://github.com/ranbeioc/xhalo-blog.git
$ cd xhalo-blog
$ npm ci
$ npm run check:all

OK xhalo-blog validation passed.
INFO Landing build: npm run build:landing
INFO Test site: npm run init:hexo-next -- --target ../my-blog-test

Powerful Capabilities, Zero Servers

xhalo-blog provides the framework, Admin, Workers API, migration tooling, and Cloudflare deployment conventions for a secure edge-native blog.

Hexo Speed

Static generation with standard Markdown compatibility and a NexT-compatible initialization path.

D1 SQLite Database

Serverless relational metadata storage for sessions, admins, audit logs, and publishing state.

R2 Object Storage

Media and attachment storage with test-only gates and safe signed-upload flows.

Turnstile Security

Protect mutation endpoints with authentication, environment gates, Turnstile, and audit logs.

Admin Panel UI

Edit posts, menus, media, Hexo/NexT config, GitHub, and Cloudflare integration state from one dashboard.

GitHub Publishing

Keep Git as the content source of truth with PR-only production publishing and test-only direct publishing.

Hexo/NexT Migration, Standardized

Initialize a private test site from the default NexT starter or import an existing Hexo/NexT blog with posts, uploads, menus, theme files, plugin config, and an audit report.

Starter Mode

Generate a clean NexT site with a welcome post when no historical source is provided.

Import Mode

Copy historical posts, uploads, pages, theme config, feed/search/sitemap/media plugin settings, and safe audit outputs into a private test repository.

Read the Guide

Use the documented flow to keep open-source framework code separate from private blog content.

Migration Guide

Edge Architecture Overview

xhalo-blog combines Cloudflare Pages, Workers, D1, R2, and GitHub to keep the static blog fast while preserving authenticated admin workflows.

Visitor / Admin Cloudflare Edge Network CF PagesStatic HTML / CSS CF Workers APIServerless Router CF R2 BucketMedia & Assets CF D1 DatabaseSQLite Metadata

Get Started in 2 Minutes

Create a starter site, import a Hexo/NexT blog, configure custom domains, and connect the right Cloudflare Pages projects.

1

Clone and Install

Get the framework source and install the locked workspace dependencies.

git clone https://github.com/ranbeioc/xhalo-blog.git
cd xhalo-blog
npm ci
2

Initialize a Test Site

Generate a default NexT starter or import an existing Hexo/NexT source into a private test repository, then set the site URL to your main domain.

npm run init:hexo-next -- --target ../my-blog-test
npm run init:hexo-next -- --target ../my-blog-test --source ../hexo-blog --site-url https://blog.example.com

# Custom main domain in generated _config.yml:
# url: https://blog.example.com
3

Build and Validate

Run the repository validation gate and build the landing page before publishing.

npm run check:all
npm run build:landing
4

Connect Cloudflare Pages

Use one Pages project for the open-source landing page and one Pages project for the private full blog test or production site.

# Product landing
Project: xhalo-blog-landing
Source: ranbeioc/xhalo-blog
Build command: npm ci && npm run build:landing
Output directory: apps/landing/dist
Domain: blog.xhalo.co

# Full blog test or production site
Project: my-blog-site
Source: your-private-blog-repo
Build command: npm ci && npm run build
Output directory: public
Domain: blog.example.com