Site Configuration Reference
Configure the ZPM Hugo documentation site, including theme settings, content mounts, local development, and GitHub Pages deployment.
On this page
This reference documents the zpm documentation site configuration, deployment, and customization options.
Overview
The zpm documentation site is built with Hugo v0.169.0 with native Dart Sass v1.108.1 using the Thulite/Doks theme. Configuration is defined in site/config/_default/ with production overrides in site/config/production/.
Local overrides in site/layouts/_partials/head/ replace the theme’s deprecated
resources.PostProcess pipeline with templates.Defer. The head partial calls
the stylesheet without partialCached, as required for deferred rendering.
Keep the parenthesized with (templates.Defer (dict ...)) syntax: Hugo recognizes
this form during template transformation. A bare with templates.Defer executes
the block immediately and makes a first production build fail when PurgeCSS reads
the still-empty hugo_stats.json. The shared global-css key runs the block once
for all pages. PostCSS uses site/config/postcss.config.mjs to declare its ES module format.
Recheck these overrides when upgrading the theme. Doks and Bootstrap still emit
upstream Sass deprecation warnings; these remain visible until their styles migrate
to modern Sass syntax.
Configuration Files
site/config/_default/
hugo.toml # Main Hugo configuration (base URL, theme, modules)
module.toml # Hugo module configuration (theme, content mounts)
params.toml # Theme parameters (colors, navigation, search)
languages.toml # Language settings
markup.toml # Markdown and syntax highlighting
menus/
menus.en.toml # Navigation menu structure
site/config/production/
hugo.toml # Production-specific overrides
hugo.toml (Main Configuration)
Base Configuration
| Setting | Default | Description |
|---|---|---|
baseURL | https://docs.awf-project.ai/zpm/ | Public URL where the site is deployed |
title | zpm | Site title (appears in browser tab and header) |
description | A Prolog inference engine for MCP | Site description (used in meta tags and search) |
languageCode | en-us | Primary language code |
defaultContentLanguage | en | Default language for content |
theme | github.com/thulite/doks/v1 | Theme module name and version |
Build Settings
| Setting | Value | Description |
|---|---|---|
outputs | {...} | Output formats (HTML, RSS, JSON feeds) |
ignoreFiles | \.template\.md$ | File patterns to exclude from the build |
timeout | 30s | Build timeout (prevents hanging builds) |
cleanDestinationDir | true | Remove old output before building |
Module Configuration
Modules define theme dependencies and content mounts. See module.toml below.
module.toml (Theme & Mounts)
Theme Module
[[module.imports]]
path = "github.com/thulite/doks/v1"
Imports the Doks theme which provides layouts, partials, and assets.
Content Mounts
Content mounts map external directories into Hugo’s content tree:
[[module.mounts]]
source = "content"
target = "content"
[[module.mounts]]
source = "../docs/getting-started"
target = "content/docs/getting-started"
[[module.mounts]]
source = "../docs/reference"
target = "content/docs/reference"
[[module.mounts]]
source = "../docs/user-guide"
target = "content/docs/user-guide"
[[module.mounts]]
source = "../docs/ADR"
target = "content/docs/adr"
This allows documentation in the repository’s docs/ directory to be rendered as part of the site without copying files.
params.toml (Theme Parameters)
Site Metadata
[params]
description = "A Prolog inference engine for MCP"
authors = ["AWF Project"]
Navigation
[params.navigation]
logo = "/images/logo.png" # Logo URL
sticky = true # Keep navbar sticky while scrolling
background = "light" # Navbar background (light or dark)
Search
[params.search]
enable = true # Enable site search
algolia = false # Use Algolia (disabled for GitHub Pages)
Colors & Branding
[params.colors]
primary = "#2060B2" # Primary accent color
secondary = "#555555" # Secondary accent color
See Theme Documentation for all available parameters.
menus.en.toml (Navigation Structure)
Defines the navigation menu visible in the site header and sidebar.
Menu Structure
[[main]]
name = "Docs"
url = "/zpm/getting-started/"
weight = 10
[[main]]
name = "GitHub"
url = "https://github.com/awf-project/zpm"
weight = 20
[[docs]]
name = "Getting Started"
url = "/zpm/getting-started/"
weight = 10
Menu Fields
| Field | Description |
|---|---|
name | Display text in the menu |
url | Link target (relative or absolute) |
weight | Sort order (lower numbers appear first) |
parent | Parent menu item (for nested menus) |
languages.toml (Language Settings)
Currently, only English is enabled:
[en]
title = "zpm"
description = "A Prolog inference engine for MCP"
languageName = "English"
contentDir = "content"
weight = 1
Other languages can be enabled by adding similar blocks and translating content files.
markup.toml (Markdown Settings)
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true # Allow HTML in markdown
Controls markdown rendering behavior. unsafe = true allows embedding HTML in markdown files.
production/hugo.toml (Production Overrides)
baseURL = "https://docs.awf-project.ai/zpm/"
[outputs]
[outputs.home]
formats = ["HTML", "RSS", "JSON"]
Production configuration ensures:
- Correct base URL for GitHub Pages
- All output formats are generated
- No draft or debug content is included
Deployment Configuration
GitHub Actions Workflow
Deployment is automated via .github/workflows/hugo.yml:
- Trigger: Pull requests targeting
mainand pushes tomain - Build: Hugo v0.169.0, native Dart Sass v1.108.1, and Node.js v26; runs
npm cithennpm run build - Deploy: Publishes the Pages artifact only after a push to
main
Environment Variables
No environment variables required. GitHub token is automatically provided by GitHub Actions.
Secrets
No secrets are stored in the site configuration. Deployment uses GitHub’s built-in GITHUB_TOKEN for authentication.
Customization Guide
Change Site Title
Edit site/config/_default/hugo.toml:
title = "New Title"
description = "New description"
Change Primary Color
Edit site/config/_default/params.toml:
[params.colors]
primary = "#FF0000" # New color in hex
Add Navigation Menu Item
Edit site/config/_default/menus/menus.en.toml:
[[main]]
name = "New Item"
url = "/zpm/new-section/"
weight = 15
Enable Search Engine Indexing
Edit site/config/_default/params.toml:
[params.analytics]
enable = true
google_analytics_id = "G-XXXXXXX" # Add your Google Analytics ID
Add Custom CSS
Place custom styles in site/assets/css/custom.scss. Hugo automatically concatenates them with theme styles.
// site/assets/css/custom.scss
.custom-class {
color: $primary-color;
}
Add Custom JavaScript
Place custom scripts in site/assets/js/custom.js. Hugo automatically includes them.
// site/assets/js/custom.js
document.addEventListener('DOMContentLoaded', function() {
// Custom behavior
});
Troubleshooting
Build Fails with Module Error
Problem: failed to resolve module ...
Solution: Ensure go is installed (go version) and run:
cd site
rm -rf resources/ && npm run build
Site Looks Different Locally than Production
Problem: Local npm run dev looks different from production.
Solution: Build with production config:
cd site
HUGO_ENVIRONMENT=production npm run build
npm run preview
Deploy Fails with Permission Error
Problem: GitHub Actions deploy job fails with “403 Forbidden”.
Solution: Ensure GitHub Pages is enabled in repository settings:
- Go to Settings → Pages
- Set Source to “GitHub Actions”
- Re-run the failed workflow
Search Not Working
Problem: Search widget appears but returns no results.
Solution: Ensure search is enabled in params.toml:
[params.search]
enable = true