A blog about software engineering, Docker, and the iterative process of building and breaking things. Built with Hugo and the PaperMod theme, configured for GitHub Pages deployment.
- π Full-text Search: Built-in search functionality using Fuse.js
- π·οΈ Tags & Categories: Organize and browse content by topics
- π± Responsive Design: Looks great on all devices
- π Dark/Light Mode: Automatic theme switching
- π Social Media Links: Connect with readers through social platforms
- π Reading Time & Word Count: Article metadata
- π Fast Performance: Static site generation for blazing-fast load times
- π³ Docker Support: Easy local development with Docker Compose
- π€ Automated Deployment: GitHub Actions workflow for GitHub Pages
For local development, you need one of the following:
- Docker and Docker Compose installed
- Hugo Extended version (0.121.0 or later)
- Git
git clone <your-repo-url>
cd blogEdit config.yml and update the following:
baseURL: Keep as/for local development (production URL is set automatically via GitHub Actions)params.socialIcons: Update with your social media linksparams.homeInfoParams: Customize your welcome messageparams.author: Add your name
# Start development server with live reload
docker compose up --watch
# The site will be available at http://localhost:1313/Alternative commands:
# Build for production
docker compose --profile build up
# Preview production build with nginx
docker compose --profile preview up
# Simple development server without watch
docker compose up# Start the development server
hugo server -D
# The site will be available at http://localhost:1313# Using Hugo CLI
hugo new posts/my-new-post.md
# Or manually create a file in content/posts/---
title: "Your Post Title"
date: 2024-01-04T10:00:00+00:00
draft: false
tags: ["tag1", "tag2", "tag3"]
categories: ["Category"]
author: "Your Name"
showToc: true
TocOpen: false
description: "Post description for SEO"
cover:
image: "path/to/cover-image.jpg"
alt: "Cover image description"
caption: "Image caption"
---
Your content here...-
Create a GitHub Repository
- Repository name can be anything (doesn't need to be
username.github.io)
- Repository name can be anything (doesn't need to be
-
Enable GitHub Pages
- Go to Settings β Pages
- Source: GitHub Actions
-
Optional: Configure Custom Domain
- Add a repository secret named
CUSTOM_DOMAINwith your domain (e.g.,example.com) - Go to Settings β Secrets and variables β Actions β New repository secret
- Configure your DNS provider to point to GitHub Pages:
- For apex domain: A records to GitHub's IPs
- For subdomain: CNAME record to
YOUR_USERNAME.github.io
- The workflow will automatically create the CNAME file during deployment
- Add a repository secret named
-
Push to GitHub
git add . git commit -m "Initial commit" git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git git push -u origin main
-
Automatic Deployment
- The GitHub Actions workflow will automatically build and deploy your site
- Check the Actions tab in your repository to monitor the deployment
- Your site will be available at:
- With custom domain:
https://YOUR_DOMAIN/ - Without custom domain:
https://YOUR_USERNAME.github.io/YOUR_REPO_NAME/
- With custom domain:
.
βββ .github/
β βββ workflows/
β βββ deploy.yml # GitHub Actions deployment workflow
βββ archetypes/ # Content templates
βββ content/
β βββ posts/ # Blog posts
β βββ archives.md # Archives page
β βββ search.md # Search page
βββ themes/
β βββ PaperMod/ # Theme submodule
βββ static/ # Static assets (images, etc.)
βββ config.yml # Hugo configuration
βββ compose.yml # Docker development setup
βββ README.md # This file
Edit config.yml to change theme settings:
params:
defaultTheme: auto # Options: light, dark, auto
disableThemeToggle: falseModify the menu in config.yml:
menu:
main:
- identifier: custom
name: Custom Page
url: /custom/
weight: 50Available social icons in config.yml:
params:
socialIcons:
- name: github
- name: twitter
- name: linkedin
- name: email
- name: facebook
- name: instagram
- name: youtube
- name: rss# Development with live reload (recommended)
docker compose up --watch
# Build production site
docker compose --profile build up
# Preview production build
docker compose --profile preview up
# View logs
docker compose logs -f server
# Stop all services
docker compose down
# Rebuild images
docker compose build --no-cache# Find process using port 1313
lsof -i :1313 # macOS/Linux
netstat -ano | findstr :1313 # Windows
# Kill the process or use a different port in docker-compose.yml# Clean Hugo cache
rm -rf resources/ public/ .hugo_build.lock
# Rebuild
hugo server -D- Draft Posts: Set
draft: truein front matter to hide posts from production - Future Posts: Posts with future dates won't appear until that date
- Syntax Highlighting: Use triple backticks with language names for code blocks
- Images: Place images in
static/images/and reference as/images/filename.jpg - SEO: Fill out description and keywords in post front matter
This project is open source and available under the MIT License.