Skip to content

About

My business site

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

dericbourg.dev

Professional website, built with Hugo.

Prerequisites

  • Docker and Docker Compose
  • Make (optional, but recommended)

Local development

With Make (recommended)

# Start the development server (http://localhost:1313)
make serve

# Get an interactive shell with Hugo
make shell

# Rebuild the Docker image
make build

# Clean up Docker images
make clean

Without Make

# docker-compose.yaml reads the pinned versions from the environment
export HUGO_VERSION=$(cat .hugo-version) WEASYPRINT_VERSION=$(cat .weasyprint-version) \
  CHECK_JSONSCHEMA_VERSION=$(cat .check-jsonschema-version)

# Start the development server
docker compose up hugo

# Get an interactive shell
docker compose run --rm shell

Useful Hugo commands

Once in the shell (make shell), you can use Hugo directly:

# Create new content
hugo new content/posts/my-article.md

# Build the site (generates in /public)
hugo

# Build with minification
hugo --minify

Version management

The Hugo version is centralized in a dedicated file:

File Description
.hugo-version Hugo version (used by Makefile and GitHub Actions)

To update versions:

echo "0.150.0" > .hugo-version
make build  # Rebuild the Docker image

Deployment

The site is automatically deployed to GitHub Pages on push to the main branch.

GitHub Actions workflow

The .github/workflows/hugo.yaml file defines the deployment pipeline:

  1. Checkout: Retrieves the source code with submodules (theme)
  2. Read Hugo version: Reads .hugo-version to ensure consistency with local development
  3. Install Hugo: Downloads and installs Hugo Extended
  4. Build: Generates the static site with hugo --gc --minify
  5. Deploy: Publishes to GitHub Pages

Project structure

.
├── .hugo-version        # Hugo version (single source of truth)
├── hugo.toml            # Hugo configuration
├── content/             # Site content (Markdown)
├── static/              # Static files (images, etc.)
├── Dockerfile           # Docker image for Hugo
├── docker-compose.yaml  # Docker services (hugo, shell)
└── Makefile             # Development commands

About

My business site

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages