REPORT
CEPATO Technical Note2026.02.02

Building a Hexo Blog from Scratch Using Only an iPad

From iPad to live: a complete guide to building a Hexo blog with GitHub Codespaces in 7 days.

Chongxi
Author:Chongxi
steam: —·spotify: —
Tags:#Hexo#Blog
ANALYSIS

0. Introduction#

Thanks to the development of web technology, mobile devices can now be mentioned in the same breath as productivity. This article will show you how to build a Hexo blog from scratch on codespaces using only an iPad

0.1 Gathering the ingredients#

  • An iPad with a good network connection
  • A GitHub account

0.2 What is a codespace#

GitHub Codespaces is a cloud-based development environment provided by GitHub that lets you use a full VS Code experience directly in the browser, without installing any development tools locally. This means we can do development work in any environment that has internet access and a browser, without depending on local physical devices — very well suited to mobile devices like the iPad

1. Basic setup#

1.1 Log in to GitHub and create a repo#

Open GitHub, log in to your account, click the + in the top-right corner, and select New repository. Fill in the repository name (e.g. hexo-blog); it’s recommended to choose private for the type, tick add a README file, and click Create repository to finish creating it.

1.2 Create a Codespace#

On the page of the repo you just created, click the Code button, select the Codespaces tab, and click Create codespace on main; wait for the codespace to finish creating. VS Code will then open in the browser, and we can do the blog setup on this page.

1.3 Install Hexo#

In the codespace terminal, enter the following command to install pnpm:

PRTCL // BASH
Terminal window
npm install -g pnpm

Install pnpm

Then install Hexo:

PRTCL // BASH
Terminal window
pnpm install hexo-cli

1.4 Initialise Hexo#

In the terminal, enter the following command to initialise Hexo:

PRTCL // BASH
Terminal window
pnpm dlx hexo init tmp

Since hexo is created in the subdirectory tmp, we need to enter that directory and move the initialisation output out

PRTCL // BASH
Terminal window
cd tmp
mv * .[^.]* ..
cd ..
rm -rf tmp

That successfully moves the temporary tmp directory’s contents out

By default pnpm doesn’t allow scripts, so we need the following command to allow builds

PRTCL // BASH
Terminal window
pnpm approve-builds

Allow pnpm build scripts

After entering it, command-line options appear; we input a, then input y and press Enter to allow all script builds, and the rest of the build completes automatically

1.5 Start hexo#

In the terminal, enter the following command to start hexo:

PRTCL // BASH
Terminal window
pnpm hexo s

The dev server then starts automatically. Click 在浏览器中打开 and you can preview the hexo blog in a new tab; press ctrl+c to stop the server Start the hexo dev server Preview the hexo blog

1.6 Make the initial commit#

Open the terminal and enter the following commands to make the initial commit:

PRTCL // BASH
Terminal window
git add .
git commit -m "Initial commit"
git push -u origin

Initial commit

Later commits can also be pushed via the Source Control icon on the left

TIP

Why commit?
In codespaces, it’s roughly equivalent to a temporary environment; committing is like hitting save once, and that save is recorded in git history, so you can view/roll back at any time

2. Using hexo#

2.1 Creating a new blog post#

In the terminal, enter the following command to create a new blog post:

PRTCL // BASH
Terminal window
pnpm hexo new "文章标题"

A new markdown file is then generated under the source/_posts directory; open this file and edit it

2.2 Changing the theme#

You can choose a theme you like from hexo’s theme gallery and install and configure it following the theme’s installation instructions. Here’s the hexo redefine theme as an example:

PRTCL // BASH
Terminal window
git submodule add https://github.com/EvanNotFound/hexo-theme-redefine themes/redefine

Then open _config.yml, find the theme field, change it to redefine, and save

Install the redefine theme

2.3 Configuration#

Open _config.yml; the most basic information can be defined here, such as the site title, description and author info — modify it as you need. Theme configuration generally needs to be configured separately; please refer to the README of the theme you’re using

3. Deploying to cloudflare pages#

Why choose cloudflare?

Cloudflare is a company that provides network security and content delivery network (CDN) services. Its main functions include protecting websites from DDoS attacks, speeding up website loading, providing SSL certificates and optimising website performance. Through its globally distributed server network, Cloudflare can efficiently cache and distribute content, thereby improving the speed and security with which users access the site.

And cloudflare pages is the static website hosting service Cloudflare provides, supporting deployment directly from a GitHub repository and publishing to the global CDN, at no cost — very well suited to a personal blog cloudflare

3.1 Log in to the cloudflare dashboard#

Open Cloudflare Dashboard, log in to your account, open the left panel, click 计算和 AI, click to create a new application, choose to deploy from a git repository, and select the hexo-blog repository you just created

3.2 Build configuration#

  • Framework preset: (leave blank)
  • Build command: pnpm hexo generate
  • Output directory: public cloudflare pages configuration

Click 保存并部署站点, wait a moment and the deployment is done cloudflare pages deployment

3.3 Accessing the site#

cloudflare gives you a dev domain by default; you can also bind your own domain via CNAME cloudflare pages access

4. Conclusion#

With that, we’ve built a hexo blog using only an iPad. I have to say, codespace really does offer a way out for mobile productivity. I hope this article helps you, and let me also leave a pit for future articles while I’m at it — if you’d like to see it, I could later do a dedicated vertical comparison of various blog frameworks

Chongxi
CHONGXIAuthor
Steam—
Spotify—
Published at:2026.02.02
Classified
Distribution Notice

Building a Hexo Blog from Scratch Using Only an iPad

Author CHONGXI/2026.02.02/CEPATO-2026-0202-HEXOIN

This work is licensed under CC BY-NC-SA 4.0. Redistribution, remixing and adaptation are allowed for non-commercial use, provided the same license is used and the original author is credited.

SubscribeDonate
Discussion
Archive_Ref
Copyright © 2011–2026 Chongxi & CEPATO
Powered by Astro & CEPATO-NEXT
StatusNon-Collaborative_Entity // CEPATO_NEXT_v27.0

Type a keyword to search