· 7 min read
How to create your own blog and deploy on CloudFlare pages in less than 10 minutes
Deploy your blog is actually pretty easy
Ler em português →I’ve always wanted to have my own blog, a place where I could showcase my projects, write about things I’m learning, share some of the problems I’ve solved, and occasionally talk about completely random stuff.
The problem is that I’ve always been very good at postponing it.
Every time I got close to finishing a blog, I would start questioning everything: “the design wasn’t quite right”, “the theme could probably be better”, “the layout needed some changes”, and “maybe I should just rewrite the whole thing using a completely different framework”. At the end of the day, my main goal “create a blog” was never accomplished.
This time, I’m trying something different. Instead of spending another few months trying to build the perfect blog before publishing the first post, I’m going to follow a much simpler rule:
Done is better than perfect
This blog is not supposed to be perfect. It’s supposed to exist.
I’ll use it to document projects, share things I’ve learned, experiment with ideas, and, from time to time, fill the internet with some random thoughts. Meanwhile, I can have some other ideas to build and deploy, but this time, the blog will be ready and I can just publish my posts and see the results before any kind of discourage.
Because of that - HUGO, I chose you!
Who’s that pokémon?

Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, makes it really easier when you just have to install it and run a command to start your own blog. Moreover, Hugo has a lot of different themes that you can check it out Hugo Themes.
Why Hugo?
There is a lot of different options of open-source static site generators, such as Astro and Jekyll. However, my primary focus is simplicity. Hugo also gives a good speed and stability, but my biggest concern is to avoid complexity and heave dependencies. Because of that, I decided to pick Hugo over any other option, since I just want simple blog posts rather than complex modern application with high user interations.
Another reason I like the Hugo approach is that the source of the website is basically just a Git repository.
My posts are Markdown files.
My configuration is a TOML file.
My theme is code.
My images are files.
Everything can live together in Git, which means the entire website can be recreated from the repository.
That makes the architecture look something like this:
Markdown
↓
Hugo
↓
Static HTML/CSS/JS
↓
Cloudflare Pages
↓
Internet
Starting your blog with Hugo
Okay, enough of garbage? Let’s start your own blog then.
Installing hugo
First, install hugo in your OS
# macOS
brew install hugo
# Linux (apt)
sudo apt install hugo
# Windows
choco install hugo -confirm
There are also other installation methods available in the Hugo documentation. Cloudflare’s own Hugo deployment guide uses the same general installation approach.
Creating your first project
Now that Hugo is installed, start your project:
hugo new site <your-blog-name>
cd <your-blog-name>
git init # this will be important to add themes later
The git init isn’t strictly required to make Hugo work, but I strongly recommend doing it from the beginning. Your blog is going to contain content, configuration, themes and probably a questionable amount of CSS changes.
The command creates a project structure similar to this:
<your-blog-name>/
├── archetypes/ # templates for new content files
├── content/ # your posts and pages (Markdown)
├── layouts/ # your own template overrides go here
├── static/ # images, favicon, etc — copied as-is
├── themes/ # theme(s) live here
└── hugo.toml # site config
Adding Themes to your project
Now that the Hugo project structure is ready, you can browse Hugo Themes and pick one.
For example, the theme I am using for this blog is PaperMod.
Hugo allows you to install themes in several ways, but I prefer using Git submodules because the theme is still maintained separately from my own repository.
For example:
git submodule add https://github.com/<author>/<theme-name>.git themes/<theme-name>
Remember to replace
<author>and<theme-name>.
Then you need to tell Hugo which theme you want to use in your hugo.toml:
theme = “PaperMod”
At this point you can start customizing the theme.
By “customizing”, I mean changing one thing, opening the browser, deciding that it looks terrible, changing another thing, and repeating the process for approximately six hours.
Running your blog locally
Before deploying anything, you probably want to see the website first.
Hugo includes a local development server:
hugo server -D
The -D flag tells Hugo to include draft posts.
Hugo will build the site and start a local server, normally available at:
http://localhost:1313/
Check the localhost correctly on your terminal
The nice thing is that Hugo watches your files while the server is running, so changes to your content and many configuration files can be reflected immediately.
This makes the development cycle ridiculously simple:
Change something
↓
Save
↓
Refresh browser (sometimes refresh isn't needed)
↓
Regret your design decision
↓
Repeat
Creating your first post
Hugo allows you to easily create your posts by running hugo new posts/<your-post-name>.md. A file with the same name of your .md post will be created with a title, date (timestamp) and draft option first set as true.
+++
title = 'Sample'
date = 2026-08-09T15:30:07-03:00
draft = true
+++
The front matter is basically metadata about your page.
The title is the title of the post.
The date is the publication date.
And draft = true tells Hugo that the post is still a draft.
This is useful because you can work on posts locally without accidentally publishing half-written thoughts to the internet.
When the post is ready, you can remove the draft property or change it to:
draft = false
Then you can start writing normally using Markdown.
Deploying your blog using Cloudflare Pages
I’ll not cover all of Hugo’s capabilities here. I recommend going through the Hugo Docs if you want to learn more about creating and managing Hugo sites.
It is also possible to deploy a Hugo blog using GitHub Pages, and honestly, GitHub Pages is a perfectly good option for a simple static website. It supports custom domains and HTTPS, so there is nothing wrong with using it.
Why Cloudflare pages?
I decided to use Cloudflare Pages because it gives me a few capabilities that I find particularly useful not only for personal blog but also for future dyamic projects. Moreover, I was willing to evaluate CloudFlare Pages a long time ago.
GitHub Pages is very limited to static files, public repositories, and a 100 GB monthly bandwidth. Using CloudFlare Pages, it is possible to deploy from privates repos without paying for a higher tier. Unilimited free bandwidht, project metrics, dynamic backend capabilities using CF workers and faster global edge deliveries are also some benefits from using Cloudflare.
For a simple Hugo blog, GitHub Pages would probably be enough. I decided to pick Cloudflare Pages because it gives me a simple deployment workflow now while leaving the door open for more functionality later or maybe migrate to some other application running on the same domain.
Also, it’s free, no credit card is neeed :)
Creating an application in Cloudflare Dashboard
After sign up for Cloudflare, search for Workers & pages and navigate to Create application. You’ll be redirected to another page to create a worker and connect with github or gitlab. On the bottom side, you’ll see a Looking to deploy Pages? Get started label. This is what we’re looking for. Click on it to start creating an application using pages.
You can import your repo or add the static files locally. Both options works, but I’ll keep following the repo path.
After authorize your github account and grant repositories permissions to your repo, you’ll need to add some project project details.
- Project name
- Production branch
- Framework preset
- Build command
- Build output directory
You can define your own preferences, but for hugo, what is really needed is the build command and output directory. I recommend using hugo --gc --minify for build command and public for output directory. After that, you just need to hit Deploy.
Boom!
Your blog is ready and deployed. CF pages will automatically create an URL for you such as: https://<your-project>.pages.dev/. Probably nothing will be visible when you click on your link yet because you will need to change baseURL in your hugo.toml file in order to update your url for your posts. You can also set your custom domain, if you have, in baseURL. You can also follow up the Custom Domain in your cloudflare page and add your domain to your project.