Build and host Danniverse site with Hugo on Cloudflare Pages
Welcome to the meta post about this very website you’re reading! I recently built and deployed my personal site – Danniverse! I wanted to share the process and why I chose this particular tech stack.
Why Hugo?
When deciding on a static site generator, I had a few requirements:
- Fast builds - I didn’t want to wait around for my site to compile
- Simple content management - Writing in Markdown is my preference
- Easy theming - I wanted something that looked good out of the box and easy to be customized
- Active community - Good documentation and theme support
Hugo checked all these boxes. Plus, it’s written in Go, which means it’s blazingly fast (I don’t know much about Go. Maybe I should add it into my bucket list?).
Setting Up Hugo
The initial setup was straightforward: Quick start
I really like the blogging platform – Κβ’α΄₯β’Κ Bear for its clean and minimal style. I choose self-hosting at the cost of leaving Bear’s platform for customizing my site as I want. I went with hugo-bearneo by Rokcso because it’s Bear blog based but more extensible and feature-rich. On top of that, I added the pinky bd-bear-theme by binarydigitlol because it feels like my vibe too :)
Deploying with Cloudflare Pages
For hosting, I chose Cloudflare Pages over other options like Netlify or GitHub Pages because:
- Cloudflare is on my list of dream companies!π«’
- Free and generous limits - More than enough for a personal blog
- Global CDN - Fast loading times everywhere
- Automatic deployments - Push to GitHub and it deploys automatically
- Built-in analytics - No need for external tracking
- Custom domain support - Easy DNS management. I bought danniverse.com on Cloudflare as well.
The deployment process is incredibly simple:
- Push my Hugo site code to a GitHub repo
- Connect the repo to Cloudflare Pages
- Configure the build command (
hugo
) and output directory (public
). Thepublic/
folder should be gitignored since it’s generated. For proper linking and deployment, setting a specific Hugo version by adding it as an env var is highly recommended. - Cloudflare automatically builds and deploys on every push
Some take-aways
A few things I picked up along the way:
- Hugo’s directory structure is logical once you understand the content hierarchy
- Custom layouts can override theme defaults without modifying the theme itself
- Cloudflare Pages is seriously fast - deployments take less than a minute
#Hugo #Cloudflare #Danniverse #Milestone