The first parametrized scaffolding tool for Hugo - bringing Angular Schematics-like functionality to static site generation
# Clone the repository
git clone https://github.com/info-tech-io/hugo-templates.git
cd hugo-templates
# Initialize submodules and install dependencies
git submodule update --init --recursive
npm ci
# Create a site with default template and compose theme
./scripts/build.sh --template=default --theme=compose --output=my-site
# Create a minimal site for faster builds
./scripts/build.sh --template=minimal --theme=minimal --output=quick-site
# Add Quiz Engine component for educational content
./scripts/build.sh --template=default --theme=compose --components=quiz-engine --output=education-site
# Production build with optimization and performance monitoring
./scripts/build.sh --template=enterprise --environment=production --minify --base-url=https://example.com --performance-track --performance-report
# Development build with performance tracking
./scripts/build.sh --template=minimal --performance-track --cache-stats
# Federated builds: Orchestrate multiple Hugo sites from different repositories
./scripts/federated-build.sh --config=examples/modules-simple.json --output=federated-site
# Production InfoTech.io 5-module federation
./scripts/federated-build.sh --config=examples/modules-infotech.json --output=production --minify
# Dry-run to test federation configuration
./scripts/federated-build.sh --config=modules.json --dry-runHugo Template Factory solves the scaffolding gap in Hugo ecosystem by providing:
- π― Parametrized Generation: Angular Schematics-like functionality for Hugo
- π§© Component Modularity: Reusable components without Go Modules complexity
- π Educational Focus: Built-in Quiz Engine and learning-oriented features
- π§ Script-Based Simplicity: Accessible to non-Go developers with Bash/Node.js
- β‘ Performance Optimized: Smart caching and optimized CI/CD workflows
- π‘οΈ Enterprise Ready: Error handling, monitoring, and production features
| Approach | Example | Flexibility | Learning Curve | Our Advantage |
|---|---|---|---|---|
| Hugo CLI | hugo new site |
β Too basic | βββββ Very easy | We provide ready-to-use templates |
| Hugo Modules | hugo mod get |
βββββ Maximum | β Expert only | We abstract complexity while keeping power |
| Starter Templates | Hugoplate, Doks | ββ Monolithic | ββββ Easy | We offer modular components vs all-or-nothing |
| Universal Tools | Cookiecutter, Yeoman | βββ Generic | βββ Moderate | We're Hugo-native with theme integration |
| Platform Builders | Hugo Blox Builder | βββ Ecosystem-locked | βββ Moderate | We stay open and Hugo-compatible |
| π Hugo Template Factory | Our solution | βββββ Maximum | ββββ Easy | Best of all worlds |
The Sweet Spot: We bridge the gap between "too simple" and "too complex" by offering the configurability of Hugo Modules with the simplicity of starter templates.
NEW: Layer 2 Federation - Orchestrate multiple Hugo sites from different repositories into a unified GitHub Pages deployment.
The federated build system allows you to:
- Merge content from multiple repositories - Each team maintains their own Hugo site independently
- Deploy as unified site - Single GitHub Pages deployment from distributed sources
- Maintain module independence - Teams develop, test, and version their content separately
- Centralized orchestration - One configuration controls the entire federation
Perfect for: Multi-team documentation, multi-repository projects, content aggregation from distributed sources.
Multi-Team Collaboration
- Each team has their own repository and workflow
- Independent development and testing
- No merge conflicts between teams
- Centralized deployment without centralized development
Distributed Content Management
- Main documentation in one repo
- API reference in another
- Blog posts, tutorials, FAQs each in separate repos
- Merge all into single site for users
Flexible Source Options
- Build from Git repositories (clone and build)
- Download pre-built sites from GitHub Releases (fastest)
- Use local module paths for development
- Mix and match strategies per module
Three Merge Strategies:
- download-merge-deploy - Download pre-built modules from GitHub Releases (fastest, CI/CD-friendly)
- merge-and-build - Clone and build all modules from source (full control)
- preserve-base-site - Merge modules into existing base site (incremental enhancement)
Intelligent Merge System:
- Automatic CSS path detection and rewriting
- Content deduplication
- Conflict resolution with priority-based merging
- YAML front matter preservation
Enterprise-Grade:
- JSON Schema validation for configurations
- 140 comprehensive tests (100% passing)
- Detailed error reporting
- Dry-run mode for testing
| Feature | Single-Site (Layer 1) | Federation (Layer 2) |
|---|---|---|
| Repositories | Single repository | Multiple repositories |
| Teams | One team | Multiple independent teams |
| Build Command | build.sh |
federated-build.sh |
| Use Case | Simple projects | Multi-team collaboration |
| Setup Complexity | β Simple | βββ Moderate |
| Scalability | Limited | βββββ Excellent |
| Independence | Tight coupling | βββββ Full independence |
Use Case 1: InfoTech.io Multi-Team Documentation
Scenario: 5 teams, each with their own repository
- Team 1: Main documentation (base site)
- Team 2: API reference
- Team 3: Tutorials
- Team 4: Blog posts
- Team 5: FAQ and troubleshooting
Solution: Federated build merges all 5 modules into single site
Result: Unified documentation portal with independent team workflows
Use Case 2: Multi-Repository Product Documentation
Scenario: Product with multiple components
- Core product docs in main repo
- Plugin documentation in plugin repos
- Community content in separate repo
Solution: Federation pulls from all repos automatically
Result: Complete documentation from distributed sources
Use Case 3: Content from Multiple Sources
Scenario: Static site with diverse content origins
- Editorial content from Git
- Product data from external API (pre-processed to Hugo)
- User-generated content from database (exported to Hugo)
Solution: Pre-process each source to Hugo modules, then federate
Result: Unified static site from multiple data sources
Step 1: Create federation configuration (modules.json):
{
"baseSite": {
"name": "main-docs",
"source": { "type": "local", "path": "./base-site" }
},
"modules": [
{
"name": "api-reference",
"source": {
"type": "github",
"repo": "your-org/api-docs",
"tag": "v1.0.0"
},
"priority": 1
}
],
"strategy": "download-merge-deploy"
}Step 2: Run federated build:
./scripts/federated-build.sh --config=modules.json --output=publicStep 3: Deploy to GitHub Pages (automated in CI/CD)
User Guides:
- Federated Builds Guide - Complete configuration reference
- Compatibility Guide - When to use federation
Tutorials:
- Simple 2-Module Tutorial - Get started in 15 minutes
- Advanced 5-Module Tutorial - Production InfoTech.io scenario
- Migration Checklist - Migrate from single-site
Developer Documentation:
- Federation Architecture - Technical design and Layer 1/2 separation
- API Reference - Complete function documentation
- Testing Guide - 140 tests with 100% coverage
Examples:
- Simple Example - 2-module federation
- Advanced Example - Complex configuration
- InfoTech.io Example - Production 5-module setup
hugo-templates/
βββ .github/
β βββ actions/ # Reusable GitHub Actions
β β βββ setup-build-env/ # Optimized build environment setup
β βββ workflows/ # CI/CD pipelines with smart caching
βββ templates/ # Parametrized site templates
β βββ default/ # Full-featured template
β βββ minimal/ # Lightweight for fast builds
β βββ academic/ # Academic publications & research
β βββ enterprise/ # Corporate features & analytics
β βββ educational/ # Learning-focused template
βββ themes/ # Hugo themes (git submodules)
β βββ compose/ # Feature-rich responsive theme
β βββ minimal/ # Clean, fast-loading theme
βββ components/ # Modular, reusable components
β βββ quiz-engine/ # Interactive educational quizzes
β βββ analytics/ # Web analytics integration
β βββ auth/ # Authentication & access control
βββ scripts/ # Build automation & tooling
β βββ build.sh # Layer 1: Single-site builds
β βββ federated-build.sh # Layer 2: Multi-module federation β NEW
β βββ validate.js # Configuration validation
β βββ diagnostic.js # System diagnostics & troubleshooting
βββ schemas/ # Configuration schemas β NEW
β βββ modules.schema.json # Federation configuration schema
βββ docs/ # Comprehensive documentation
βββ content/
β βββ user-guides/
β β βββ federated-builds.md # Federation guide β
β β βββ federation-compatibility.md # Compatibility guide β
β βββ tutorials/
β β βββ federation-simple-tutorial.md # 2-module tutorial β
β β βββ federation-advanced-tutorial.md # 5-module tutorial β
β β βββ federation-migration-checklist.md # Migration guide β
β βββ developer-docs/
β β βββ federation-architecture.md # Technical design β
β β βββ federation-api-reference.md # API documentation β
β β βββ testing/
β β βββ federation-testing.md # Testing guide (140 tests)
β βββ examples/
β βββ modules-simple.json # 2-module example
β βββ modules-advanced.json # Complex configuration
β βββ modules-infotech.json # Production 5-module setup
βββ user-guides/ # User documentation
βββ developer-docs/ # Developer guides
βββ troubleshooting/ # Problem resolution guides
βββ api-reference/ # API documentation
β = Federation-related (Layer 2)
| Template | Description | Use Case | Features |
|---|---|---|---|
| default | Full-featured template | General-purpose sites | All components, flexible layout |
| minimal | Lightweight template | Fast builds, simple sites | Essential features only |
| academic | Academic template | Research, publications | Citations, references, papers |
| enterprise | Corporate template | Business websites | Analytics, auth, professional layout |
| educational | Learning-focused | Educational platforms | Quiz engine, progress tracking |
| Component | Status | Description | Features |
|---|---|---|---|
| quiz-engine | β Ready | Interactive quiz system | Progress tracking, multiple question types, analytics |
| analytics | π§ Beta | Web analytics tracking | Google Analytics, privacy-compliant, event tracking |
| auth | π§ Beta | Authentication system | User management, access control, SSO |
| citations | π Planned | Academic citations | BibTeX, CSL, automatic formatting |
| search | π Planned | Site search functionality | Full-text search, instant results |
| comments | π Planned | Comment system | Moderation, notifications, integrations |
- Hugo Extended β₯ 0.148.0
- Node.js β₯ 18.0.0
- Git for theme management
- Bash shell (Linux/macOS) or Git Bash (Windows)
- Build System Guide - Complete build system documentation
- Federated Builds Guide β - Multi-module federation reference
- Federation Compatibility β - When to use federation
- Getting Started - Step-by-step tutorial
- Template Usage - Working with templates
- Deployment Guide - Production deployment
- Testing Documentation - Comprehensive testing guide with 140 tests
- Test Inventory - Complete test catalog (Layer 1 + Layer 2)
- Testing Guidelines - Standards and best practices
- Coverage Matrix - Function coverage analysis
- Federation Testing β - Federation test suite (140 tests, 100%)
- Federation Architecture β - Layer 1/2 design and technical details
- Federation API Reference β - Complete function documentation (28 functions)
- Alternatives Analysis - How we compare to other Hugo tools
- Component Development - Creating custom components
- GitHub Actions Guide - CI/CD workflows and optimization
- API Reference - Complete API documentation
- Contributing Guide - Contribution guidelines (includes federation workflow)
- Common Issues - Problem resolution guide
- Error Reference - Error codes and solutions
- Performance Guide - Optimization techniques
- Use Cases & User Stories - Real-world usage scenarios and examples
- Simple 2-Module Federation β - Get started with federation (15 min)
- Advanced 5-Module Federation β - Production InfoTech.io scenario (45 min)
- Federation Migration Checklist β - Migrate from single-site
- First Site Tutorial - Create your first site
- Getting Started Guide - Comprehensive getting started tutorial
- Educational Platform - Build a learning platform
- Corporate Website - Business website setup
- Academic Site - Research publication site
Current Version: 0.2.0 - Build System v2.0
- β Error Handling System - Comprehensive error handling and diagnostics
- β Test Coverage Framework - BATS testing with 95%+ coverage
- β GitHub Actions Optimization - 50%+ performance improvement in CI/CD
- β Documentation Updates - Comprehensive guides and troubleshooting
- β Performance Optimization - 4-phase performance framework with intelligent caching, parallel processing, monitoring, and analytics
- Multi-Level Caching (L1/L2/L3) - Intelligent caching for maximum build speed
- Parallel Processing - Optimized parallel operations with job throttling
- Performance Monitoring - Real-time tracking, historical analysis, and optimization recommendations
- Advanced CLI Options -
--performance-track,--performance-report,--performance-history,--cache-stats
This framework is under active development as part of the info-tech-io educational platform ecosystem.
We welcome contributions! This project aims to become the definitive scaffolding framework for the Hugo ecosystem.
- Fork the repository
- Create a feature branch from
epic/build-system-v2.0 - Follow our Contributing Guidelines
- Submit a Pull Request
- Epic Issues: Large features tracked as Epics
- Child Issues: Individual features within Epics
- Feature Branches: Development branches for each Child Issue
- Epic Integration: All features merge to Epic branch before main
"Hugo Template Factory reduced our site setup time from hours to minutes while maintaining full customization capabilities." - Educational Platform Team
"The component system allowed us to create standardized, reusable building blocks across multiple projects." - Enterprise Development Team
Apache License 2.0 - see LICENSE file for details.
This project is licensed under Apache 2.0 in accordance with info-tech-io organization licensing policy.
- Hugo Framework - Static site generator
- info-tech-io Organization - Open source projects
- INFOTEKA Platform - Educational platform
- Project Issues - Bug reports and feature requests
- Discussions - Community discussions
Built with β€οΈ by the info-tech-io team
β Star this project β’ π Report Bug β’ π‘ Request Feature