Mp website built with Hugo and the Congo theme, hosted on GitHub Pages with a custom domain.
This repository documents the transition from an Astro-based static site to a Hugo-based site with the Congo theme. This README serves as a guide for understanding the migration process and the new setup.
- Project Overview
- Migration Process
- Project Structure
- Installation & Setup
- Configuration
- Local Development
- Deployment
- Custom Domain Setup
- Important Notes
This is a personal website and blog powered by:
- Static Site Generator: Hugo (written in Go)
- Theme: Congo (modern, customizable, responsive)
- Hosting: GitHub Pages
- Custom Domain: bil.arikan.ca
- Deployment: GitHub Actions CI/CD
Before starting the Hugo setup, I archived the existing Astro-based site:
# Document and backup the existing site structure
git log --oneline > ASTRO_MIGRATION_LOG.txt
# Tag the final Astro version
git tag -a astro-final -m "Final Astro-based site version"
git push origin astro-finalAfter archiving, removed all Astro-specific files and directories:
# Remove Astro configuration and node_modules
rm -rf node_modules package.json package-lock.json
rm -rf src/ public/ dist/ draft/
rm astro.config.mjs tsconfig.json LICENSE package-lock.json package.jsonKept files needed for GitHub Pages and deployment:
✓ .github/ (workflows directory)
✓ .gitignore (update for Hugo)
✓ .vscode/ (vscode directory)
✓ README.md (this file - updated)
✓ CNAME (custom domain configuration)
With the directory cleaned, initialized the new Hugo site:
# Install Hugo (via Homebrew on macOS)
brew install hugo
# Create new Hugo site content structure
hugo new site . --forceAfter the migration, the final project structure looks like:
bilarikan.github.io/
├── .github/
│ └── workflows/
│ └── hugo.yml # GitHub Actions deployment workflow
├── content/
│ ├── posts/ # Blog posts
│ │ └── _index.md
│ ├── projects/ # Project showcase
│ │ └── _index.md
│ ├── about.md # About page
│ └── contact.md # Contact page
├── static/
│ ├── img/ # Images and assets
│ └── ...
├── themes/
│ └── congo/ # Congo theme (git submodule)
├── .github/
├── .gitignore
├── .gitmodules # Git submodule configuration
├── CNAME # Custom domain (bil.arikan.ca)
├── hugo.toml # Hugo configuration
├── README.md # This file
└── LICENSE
The Congo theme is added as a git submodule, allowing it to be updated independently:
# Add Congo theme
git submodule add -b stable https://github.com/jpanther/congo.git themes/congo
# Initialize and update submodules
git submodule init
git submodule updateIn the root folder of the site, delete the hugo.toml file that was generated by Hugo.
In themes/congo/config/_default there is the hugo.toml file that contains all configuration.
Key settings:
baseURL = 'https://bil.arikan.ca/'
languageCode = 'en-us'
title = 'Bil Arikan'
theme = 'congo'
enableRobotsTXT = true
summaryLength = 30
[pagination]
pagerSize = 10
[outputs]
home = ["HTML", "RSS", "JSON"]
[params]
colorScheme = "auto" # auto, light, or dark
defaultTheme = "auto"
enableSearch = true
enableCodeCopy = true
[[params.author]]
name = "Bil Arikan"
image = "img/profile.jpg"
headline = "Learner & Tinkerer"
bio = "Exploring ideas at the intersection of learning & technology"
links = [
{ github = "https://github.com/bilarikan" },
{ linkedin = "https://linkedin.com/in/bilarikan" }
]Organize the content logically:
content/
├── posts/
│ ├── _index.md # Posts list page
│ └── my-first-post.md
├── projects/
│ ├── _index.md # Projects list page
│ └── project-1.md
├── about.md # About page
└── contact.md # Contact page
Each markdown file starts with front matter:
---
title: "Post Title"
date: 2025-02-04
description: "Brief description for SEO and previews"
tags: ["tag1", "tag2"]
categories: ["Category"]
draft: false
---
Your content here...For the custom domain bil.arikan.ca:
- Create a
CNAMEfile in thestatic/directory with your domain:
bil.arikan.ca
-
Configure DNS records with your domain registrar pointing to GitHub Pages
-
Enable custom domain in GitHub Pages settings (Settings → Pages → Custom domain)
# Start Hugo server with draft posts
hugo server -D
# Visit http://localhost:1313 in your browserThe -D flag includes draft posts. Hugo automatically rebuilds when you save files, providing instant feedback.
# Generate production build
hugo --minify
# This creates the public/ directory ready for deploymentThe site automatically builds and deploys when you push to the main branch. The workflow file is located at .github/workflows/hugo.yml:
Key steps:
- Checkout code with submodules
- Setup Hugo (extended version)
- Build site with
hugo --minify - Upload artifacts to GitHub Pages
- Deploy using GitHub's deployment API
# Commit and push changes
git add .
git commit -m "Add new post or update content"
git push origin mainGitHub Actions automatically triggers and deploys within seconds.
# Update theme to latest stable version
git submodule update --remote themes/congo
# Commit changes
git add .
git commit -m "Update Congo theme"
git push origin mainFor bil.arikan.ca, you need to:
-
Add DNS records with your domain registrar:
- Type: CNAME
- Host:
www(or appropriate subdomain) - Value:
bilarikan.github.io
-
GitHub Pages Settings:
- Go to repository → Settings → Pages
- Under "Custom domain," enter:
bil.arikan.ca - Enable "Enforce HTTPS"
-
Verify CNAME File:
- Ensure
static/CNAMEcontains your domain - The file will be copied to the root of the built site
- Ensure
# Hugo
/public/
/resources/_gen/
/.hugo_build.lock
# OS
.DS_Store
Thumbs.db
# Editor
.vscode/
.idea/
# Backup Files
*.bak
*.old
Important: The public/ directory is ignored because GitHub Actions regenerates it on every deployment.
| Issue | Solution |
|---|---|
| Theme not loading | Run git submodule update --init --recursive |
| Extended Hugo required | Install: brew install hugo --with-extended |
| Build fails locally but works on GitHub | Check Hugo version matches (use extended: true in workflow) |
| Custom domain not working | Verify CNAME file exists and DNS records are configured |
| Submodule conflicts | Run git submodule foreach git fetch and update |
This Hugo + Congo setup provides:
- Static HTML files (no server processing)
- Minified assets automatically
- GitHub's CDN for fast delivery
- Automatic HTTPS
- SEO-friendly URLs and structure
- RSS feed generation
- Optimized images and lazy loading
Total cost: $0
- Hugo: Free & open source
- Congo theme: Free
- GitHub Pages: Free for public repos
- GitHub Actions: 2,000 minutes/month free (more than enough)
- SSL Certificate: Included with GitHub Pages
- Always use Extended Hugo - Required for SCSS/Sass support
- Update theme via submodules - Keeps themes independent and updatable
- Test locally first - Always run
hugo serverbefore pushing - Use meaningful commit messages - Makes migration history clear
- Organize content logically - Use directories for different content types
- Enable draft mode for WIP - Set
draft: truein front matter while writing