Overview
Here’s the complete directory structure:Directory details
archetypes/
Templates for new content created withhugo new.
hugo new content/posts/my-post/index.md, Hugo uses archetypes/default.md as the template, pre-populating frontmatter fields.
assets/
Source files that need processing (SCSS, JavaScript, images). The Congo theme processes these during build.- SCSS compilation
- Asset minification
- Image processing
- Fingerprinting for cache busting
config/
The primary configuration directory. This project uses the modular configuration approach instead of a singlehugo.toml.
config.toml
Core site settings (config/_default/config.toml:1-18):module.toml
Hugo module configuration (config/_default/module.toml:1-5):content/
All your Markdown content files. This is where you write posts and pages.- Each post/page can be a single
.mdfile or a directory withindex.md - Using directories (leaf bundles) allows you to co-locate images and resources
- Directory names become URL slugs (e.g.,
posts/my-post/→/posts/my-post/)
i18n/
Internationalization translation files. Used for multi-language support with the Congo theme.layouts/
Custom templates that override or extend the Congo theme’s layouts.layouts/(your custom templates)- Theme’s
layouts/(from Congo module)
public/
Generated directory - contains the built static site. Do not edit files here directly.hugo- production buildhugo server- serves from memory (doesn’t write here)
- Excluded from version control
- Used as your deployment source
- Regenerated for each build
resources/
Generated directory - Hugo’s cache for processed assets.static/
Static files copied directly topublic/ without processing.
static/favicon.ico→https://benson.vc/favicon.icostatic/images/logo.png→https://benson.vc/images/logo.png
- Favicons
- Root-level files (robots.txt, sitemap.xml)
- Files that don’t need processing
themes/
Traditionally for theme files, but unused in this project because the Congo theme is loaded via Hugo modules (seego.mod).
Important files
go.mod and go.sum
Hugo module dependencies (go.mod:1-6):- Define the Congo theme dependency (v2.11.0)
- Are managed by
hugo modcommands - Ensure reproducible builds
- Lock dependency versions (go.sum contains checksums)
hugo.toml
Legacy root configuration file (hugo.toml:1-4). This project usesconfig/_default/ instead, making this file largely redundant:
config/_default/config.toml. You can safely ignore or remove this file.
.hugo_build.lock
Build lock file created by Hugo. Should be excluded from version control (it’s in.gitignore).
.gitignore
Specifies files to exclude from Git:Configuration cascade
Hugo’s configuration follows a specific hierarchy:- Root config:
hugo.toml(legacy, mostly unused here) - Default config:
config/_default/*.toml(primary configuration) - Environment config:
config/production/*.tomlorconfig/development/*.toml(optional) - Command line: Flags passed to
hugoorhugo server
Build outputs
When you runhugo, the build process:
- Reads configuration from
config/_default/ - Loads the Congo theme module
- Processes content from
content/ - Applies templates from
layouts/and theme - Processes assets from
assets/ - Copies files from
static/ - Generates output to
public/
public/ directory contains:
- HTML pages
- Processed CSS and JavaScript
- Optimized images
- RSS feed (
index.xml) - JSON search index (for theme search)
- Sitemap (
sitemap.xml)
Next steps
Now that you understand the project structure:- Learn about site configuration
- Explore content creation
- Customize theme settings
- Review deployment options