I moved my blog to Codeberg. No big reason - just wanted to try something different.

Fixing Tags

First thing I ran into: Codeberg doesn’t play nice with # in URLs. My existing tags like c# and .net worked fine on GitHub - or at least the URLs didn’t break - but on Codeberg, they caused problems.

Simple fix - renamed them to csharp and dotnet, and tweaked my theme to show proper names instead of raw tag names. Took an evening, but now it’s clean.

Clean Separation

This move finally forced me to do something I’d been meaning to for ages: separate my blog content from the code samples repository.

Before, everything lived in one repo with two branches - constantly swapping branches to publish either content or code. It was messy. Now I have two clean, separate repositories: one for the blog source, one for the pages output. No more branch confusion.

Custom Domain Setup

Codeberg has Pages for hosting static sites. Works great, except the new version doesn’t support custom domains yet. The docs say if you want your own domain, you need the old method: build your site locally and push the files to a separate pages repo.

Manual work? Not a fan. So I wrote a PowerShell script to do it for me.

The Script

Nothing complicated - it just:

  • Builds my Hugo site (with minification)
  • Copies the files to my local pages folder
  • Adds the .domains file (tells Codeberg which domains to use)
  • Pushes everything to Codeberg

One command, done. The script lives in my source repository, so I never forget how it works.

DNS Setup

Pointing albertakhmetov.com to Codeberg meant updating my DNS. Codeberg’s custom domain guide explains exactly what records to add. Followed that, waited a few minutes, and everything worked.

That’s It

Site works, domain works, automation works. Nothing changed for anyone reading this, but that’s the point - good migrations are invisible.