Creating this blog involved using modern static site generation tools, cloud deployment services, and a personal automation setup to streamline content management. In this article, I’ll guide you through the process, from the foundation of the blog to the automated workflows that keep it running efficiently.

Choosing the Static Site Generator

For this blog, I chose Hugo, a fast and flexible static site generator. The main reason for this choice is that I was already using Obsidian as my primary text editor, and Obsidian does not have a suitable blog plugin. While it does offer Obsidian Publish, this feature comes with a paywall and lacks extensive theme customization options.

Hugo, on the other hand, is designed to work primarily with Markdown, which aligns perfectly with my workflow. It allows for full control over themes and site structure, making it a natural fit for my blogging needs.

One of Hugo’s key strengths is its support for themes, which allows for quick customization. I opted for the Heyo theme, a well-designed theme with a simple and elegant layout. However, I made significant modifications to the color scheme to better align with my personal branding and visual preferences.

Deployment with Cloudflare Pages

To make my blog accessible to the world, I deployed it using Cloudflare Pages. Cloudflare Pages is a free and reliable hosting service optimized for static sites. It provides an easy-to-use interface for integrating with Git repositories and automatically redeploying the site when changes are pushed to the repository.

Why Cloudflare Pages?

  • Free Tier: The free plan is more than sufficient for a personal blog.
  • Global CDN: Ensures fast loading times by distributing the content across Cloudflare’s extensive network.
  • Automatic Deployments: No need to manually upload files; Cloudflare listens for changes in the Git repository and updates the site accordingly.
  • Security and Performance: Comes with built-in security features such as DDoS protection and HTTPS.

By linking my Hugo-generated site to a Git repository, Cloudflare Pages detects changes and automatically rebuilds and deploys the blog, ensuring that updates go live without any manual intervention.

Writing and Editing Workflow

For writing blog posts, I use Obsidian, a powerful markdown-based text editor. Obsidian provides an excellent environment for managing notes and writing content, with support for linking ideas, organizing files, and customizing the workspace.

The typical workflow for writing a new article is:

  1. I draft the article in Obsidian using Markdown.
  2. The files are automatically synchronized with OneDrive, making them accessible from my home server.
  3. At scheduled intervals, a Rust script runs on my home server. This script processes the Markdown files, modifying them to include necessary Hugo-specific front matter and other metadata.
  4. Once processed, the script automatically commits the changes to my Git repository.
  5. Cloudflare Pages detects the commit, triggers a site rebuild, and deploys the updated content.

This automated system eliminates the need for manual conversion and deployment, making the blogging experience seamless and efficient.

Automating Content Processing with Rust

A crucial part of my blogging setup is the Rust script that ensures my Markdown files are Hugo-ready. The script performs several tasks, including:

  • Adding front matter (YAML or TOML metadata) required by Hugo.
  • Standardizing formatting and applying custom transformations.
  • Ensuring consistency in file structure and naming conventions.
  • Committing and pushing updates to the Git repository.

Using Rust for this task offers speed and reliability. Rust’s performance ensures that the script runs efficiently even with multiple posts being processed.

Final Thoughts

Building this blog with Hugo and Cloudflare Pages has been an excellent choice due to its speed, reliability, and low cost. The use of automation, from Obsidian for writing to Rust scripts for processing and Git for version control, ensures that updates happen seamlessly without much manual effort.

If you’re considering building a blog with similar technology, I highly recommend:

  • Learning Hugo: It’s beginner-friendly but powerful.
  • Exploring Cloudflare Pages: Free, fast, and easy to set up.
  • Using Markdown editors like Obsidian: Great for writing and organizing thoughts.
  • Automating workflows: Whether with scripts, Git hooks, or other tools, automation saves time and reduces errors.

This setup has allowed me to focus more on writing and less on the technical aspects of deployment. If you’re looking for a simple, yet powerful way to build and maintain a blog, this approach might be perfect for you.