Configuration Schema & Cascade Inheritance
Comprehensive technical reference for global hugo.yaml parameters, multi-subdomain environment configs, and cascading folder overrides.
The Hugo-Carbon Modular Engine employs an enterprise-grade configuration hierarchy built on top of Hugo’s directory-based configuration architecture. It separates global platform defaults from subdomain-specific overrides while supporting folder-level cascading parameters.
| |
1. Global Baseline Blueprint (config/_default/hugo.yaml)
The _default configuration establishes global defaults, multilingual routing, security policies, token scales, and fallback widget configurations.
| |
2. Environment Override Files
When Hugo compiles an environment with hugo --environment <name>, it layers config/<name>/hugo.yaml over config/_default/hugo.yaml.
Subdomain Configurations
| Subdomain | Environment Flag | Dev Port | Key Config Features |
|---|---|---|---|
cesar.caldeira.cc | cesar | 1313 | Personal Hub, Biographical manifest, Archive |
blog.caldeira.cc | blog | 1314 | Editorial journal, Serif typography (typography.content: "serif"), right TOC sidebar |
apps.caldeira.cc | apps | 1315 | Interactive apps, Stockfish chess, WebLLM AI persona, simulation canvas |
carbon.caldeira.cc | carbon | 1316 | Documentation hub, 3-level custom left sidebar (sidebars.left.data: "docs"), Style guide studio |
assets.caldeira.cc | assets | 1317 | Shared CDN target hosting compiled CSS, JS, fonts, and images |
Example: config/carbon/hugo.yaml
| |
3. Folder-Level Cascading Configuration
Hugo allows folder _index.md files to declare a cascade: block. All child pages in that directory automatically inherit the parameters.
Example: Cascading Layout & Theme in content/carbon/docs/_index.md
| |
Parameter Resolution Priority
When resolving any configuration value (e.g., sidebar visibility or typography choice), the engine queries in the following strict order:
- Page Front-Matter (highest priority — e.g.
sidebars: left: enable: false) - Folder Cascaded Parameters (inherited from nearest parent
_index.mdcascade:) - Environment Config (
config/<env>/hugo.yaml) - Global Baseline Config (
config/_default/hugo.yaml— lowest priority fallback)
4. Custom 3-Level Left Sidebar Configuration
The engine supports rich, nested navigation sidebars defined in data/sidebars/<name>.yaml.
Data Schema (data/sidebars/docs.yaml)
| |